Package net.sf.antcontrib.cpptasks
Class VersionInfo
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
net.sf.antcontrib.cpptasks.VersionInfo
- All Implemented Interfaces:
Cloneable
public final class VersionInfo
extends org.apache.tools.ant.types.DataType
Version Information.
This information is applied in a platform specific manner
to embed version information into executable images. This
behavior is new and subject to change.
On the Microsoft Windows platform, a resource is generated and added
to the set of files to be compiled. A resource compiler must
be specified to compile the generated file.
On Unix platforms, versioninfo is currently not used.
Future versions may append fileversion to the output file name,
use compatibility version for -soname and possibly create
symbolic links.
-
Field Summary
Fields inherited from class org.apache.tools.ant.types.DataType
checked, ref
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Methods is required for documentation generation, throws exception if called.Gets Company name.Gets compatibility version.org.apache.tools.ant.types.Reference
Gets comments.Gets Description.Gets file version.final String
getIf()
Gets if property name.Gets internal name.Gets file language, should be an IETF RFC 3066 identifier, for example, en-US.Gets legal copyright.Gets legal trademark.Gets original filename.Gets patched.Gets prerelease.Gets private build.Gets product name.Gets Product version.Special buildfinal String
Gets if property name.final boolean
isActive()
Returns true if the define's if and unless conditions (if any) are satisfied.merge()
Returns a VersionInfo that reflects any inherited version information.void
setCompanyname
(String value) Sets company name.void
setCompatibilityversion
(String value) Sets compatibility version.void
setExtends
(org.apache.tools.ant.types.Reference extendsRef) Specifies that this element extends the element with id attribute with a matching value.void
setFilecomments
(String value) Sets comments.void
setFiledescription
(String value) Sets file description.void
setFileversion
(String value) Sets file version.void
Sets an id that can be used to reference this element.final void
Sets the property name for the 'if' condition.void
setInternalname
(String value) Sets internal name.void
setLanguage
(String value) Sets language.void
setLegalcopyright
(String value) Sets legal copyright.void
setLegaltrademarks
(String value) Sets legal trademark.void
setOriginalfilename
(String value) Sets original name.void
setPatched
(boolean value) Sets prerelease.void
setPrerelease
(boolean value) Sets prerelease.void
setPrivatebuild
(String value) Sets private build.void
setProductname
(String value) Sets product name.void
setProductversion
(String value) Sets product version.void
setRefid
(org.apache.tools.ant.types.Reference r) Specifies that this element should behave as if the content of the element with the matching id attribute was inserted at this location.void
setSpecialbuild
(String value) Sets private build.final void
Set the property name for the 'unless' condition.Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes, toString
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
Constructor Details
-
VersionInfo
public VersionInfo()Constructor.
-
-
Method Details
-
merge
Returns a VersionInfo that reflects any inherited version information.- Returns:
- merged version information.
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionMethods is required for documentation generation, throws exception if called.- Throws:
org.apache.tools.ant.BuildException
- if called
-
isActive
public final boolean isActive() throws org.apache.tools.ant.BuildExceptionReturns true if the define's if and unless conditions (if any) are satisfied.- Throws:
org.apache.tools.ant.BuildException
- throws build exception if name is not set
-
setId
Sets an id that can be used to reference this element.- Parameters:
id
- id
-
getExtends
public org.apache.tools.ant.types.Reference getExtends() -
setExtends
public void setExtends(org.apache.tools.ant.types.Reference extendsRef) throws org.apache.tools.ant.BuildException Specifies that this element extends the element with id attribute with a matching value. The configuration will be constructed from the settings of this element, element referenced by extends, and the containing cc element.- Parameters:
extendsRef
- Reference to the extended processor definition.- Throws:
org.apache.tools.ant.BuildException
- if this processor definition is a reference
-
getIf
Gets if property name.- Returns:
- property name, may be null.
-
setIf
Sets the property name for the 'if' condition. The define will be ignored unless the property is defined. The value of the property is insignificant, but values that would imply misinterpretation ("false", "no") will throw an exception when evaluated.- Parameters:
propName
- property name
-
setRefid
public void setRefid(org.apache.tools.ant.types.Reference r) throws org.apache.tools.ant.BuildException Specifies that this element should behave as if the content of the element with the matching id attribute was inserted at this location. If specified, no other attributes should be specified.- Overrides:
setRefid
in classorg.apache.tools.ant.types.DataType
- Throws:
org.apache.tools.ant.BuildException
-
getUnless
Gets if property name.- Returns:
- property name, may be null.
-
setUnless
Set the property name for the 'unless' condition. If named property is set, the define will be ignored. The value of the property is insignificant, but values that would imply misinterpretation ("false", "no") of the behavior will throw an exception when evaluated.- Parameters:
propName
- name of property
-
getFileversion
Gets file version.- Returns:
- file version, may be null.
-
getProductversion
Gets Product version.- Returns:
- product version, may be null
-
getCompatibilityversion
Gets compatibility version.- Returns:
- compatibility version, may be null
-
getLanguage
Gets file language, should be an IETF RFC 3066 identifier, for example, en-US.- Returns:
- language, may be null.
-
getFilecomments
Gets comments.- Returns:
- comments, may be null.
-
getCompanyname
Gets Company name.- Returns:
- company name, may be null.
-
getFiledescription
Gets Description.- Returns:
- description, may be null.
-
getInternalname
Gets internal name.- Returns:
- internal name, may be null.
-
getLegalcopyright
Gets legal copyright.- Returns:
- legal copyright, may be null.
-
getLegaltrademarks
Gets legal trademark.- Returns:
- legal trademark, may be null;
-
getOriginalfilename
Gets original filename.- Returns:
- original filename, may be null.
-
getPrivatebuild
Gets private build.- Returns:
- private build, may be null.
-
getPrerelease
Gets prerelease.- Returns:
- prerelease, may be null.
-
getPatched
Gets patched.- Returns:
- patched, may be null.
-
getProductname
Gets product name.- Returns:
- product name, may be null.
-
getSpecialbuild
Special build- Returns:
- special build, may be null.
-
setFileversion
Sets file version.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setProductversion
Sets product version.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setCompatibilityversion
Sets compatibility version.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setLanguage
Sets language.- Parameters:
value
- new value, should be an IETF RFC 3066 language identifier.- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setFilecomments
Sets comments.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setFiledescription
Sets file description.- Parameters:
value
- new value
-
setCompanyname
Sets company name.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setInternalname
Sets internal name. Internal name will automatically be specified from build step, only set this value if intentionally overriding that value.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setLegalcopyright
Sets legal copyright.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setLegaltrademarks
Sets legal trademark.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setOriginalfilename
Sets original name. Only set this value if intentionally overriding the value from the build set.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setPrivatebuild
Sets private build.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setPrerelease
public void setPrerelease(boolean value) throws org.apache.tools.ant.BuildException Sets prerelease.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setPatched
public void setPatched(boolean value) throws org.apache.tools.ant.BuildException Sets prerelease.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setProductname
Sets product name.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-
setSpecialbuild
Sets private build.- Parameters:
value
- new value- Throws:
org.apache.tools.ant.BuildException
- if specified with refid
-