net.sf.antcontrib.cpptasks
Class VersionInfo

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.types.DataType
          extended by net.sf.antcontrib.cpptasks.VersionInfo
All Implemented Interfaces:
Cloneable

public class VersionInfo
extends org.apache.tools.ant.types.DataType

Version Information. (Non-functional prototype)

Rating red

Field Summary
 
Fields inherited from class org.apache.tools.ant.types.DataType
checked, ref
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
location, project
 
Constructor Summary
VersionInfo()
          Constructor.
 
Method Summary
 void execute()
           
 String getCompanyname()
          Gets Company name.
 String getCompatibilityversion()
          Gets compatibility version.
 String getDescription()
          Gets Description.
 String getFilecomments()
          Gets comments.
 String getFileversion()
          Gets file version.
 String getInternalname()
          Gets internal name.
 String getLanguage()
          Gets file language, should be an IETF RFC 3066 identifier, for example, en-US.
 String getLegalcopyright()
          Gets legal copyright.
 String getLegaltrademark()
          Gets legal trademark.
 String getOriginalfilename()
          Gets original filename.
 String getPrivatebuild()
          Gets private build.
 String getProductname()
          Gets product name.
 String getProductversion()
          Gets Product version.
 String getSpecialbuild()
          Special build
 boolean isActive()
          Returns true if the define's if and unless conditions (if any) are satisfied.
 void setCompanyname(String value)
          Sets company name.
 void setCompatibilityversion(String value)
          Sets compatibility version.
 void setExtends(String id)
          Sets the name of a version info that this info extends.
 void setFilecomments(String value)
          Sets comments.
 void setFileversion(String value)
          Sets file version.
 void setId(String id)
          Sets an id that can be used to reference this element.
 void setIf(String propName)
          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 setLegaltrademark(String value)
          Sets legal trademark.
 void setOriginalfilename(String value)
          Sets original name.
 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.
 void setUnless(String propName)
          Set the property name for the 'unless' condition.
 void writeResource(Writer writer, org.apache.tools.ant.Project p, String executableName)
          Writes windows resource
 
Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes, toString
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getLocation, getProject, log, log, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VersionInfo

public VersionInfo()
Constructor.

Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

isActive

public final boolean isActive()
                       throws org.apache.tools.ant.BuildException
Returns 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

public void setId(String id)
Sets an id that can be used to reference this element.

Parameters:
id - id

setExtends

public void setExtends(String id)
Sets the name of a version info that this info extends.

Parameters:
id - id

setIf

public final void setIf(String propName)
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 class org.apache.tools.ant.types.DataType
Throws:
org.apache.tools.ant.BuildException

setUnless

public final void setUnless(String propName)
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

public String getFileversion()
Gets file version.

Returns:
file version, may be null.

getProductversion

public String getProductversion()
Gets Product version.

Returns:
product version, may be null

getCompatibilityversion

public String getCompatibilityversion()
Gets compatibility version.

Returns:
compatibility version, may be null

getLanguage

public String getLanguage()
Gets file language, should be an IETF RFC 3066 identifier, for example, en-US.

Returns:
language, may be null.

getFilecomments

public String getFilecomments()
Gets comments.

Returns:
comments, may be null.

getCompanyname

public String getCompanyname()
Gets Company name.

Returns:
company name, may be null.

getDescription

public String getDescription()
Gets Description.

Overrides:
getDescription in class org.apache.tools.ant.ProjectComponent
Returns:
description, may be null.

getInternalname

public String getInternalname()
Gets internal name.

Returns:
internal name, may be null.

getLegalcopyright

public String getLegalcopyright()
Gets legal copyright.

Returns:
legal copyright, may be null.

getLegaltrademark

public String getLegaltrademark()
Gets legal trademark.

Returns:
legal trademark, may be null;

getOriginalfilename

public String getOriginalfilename()
Gets original filename.

Returns:
original filename, may be null.

getPrivatebuild

public String getPrivatebuild()
Gets private build.

Returns:
private build, may be null.

getProductname

public String getProductname()
Gets product name.

Returns:
product name, may be null.

getSpecialbuild

public String getSpecialbuild()
Special build

Returns:
special build, may be null.

setFileversion

public void setFileversion(String value)
                    throws org.apache.tools.ant.BuildException
Sets file version.

Parameters:
value - new value
Throws:
org.apache.tools.ant.BuildException - if specified with refid

setProductversion

public void setProductversion(String value)
                       throws org.apache.tools.ant.BuildException
Sets product version.

Parameters:
value - new value
Throws:
org.apache.tools.ant.BuildException - if specified with refid

setCompatibilityversion

public void setCompatibilityversion(String value)
                             throws org.apache.tools.ant.BuildException
Sets compatibility version.

Parameters:
value - new value
Throws:
org.apache.tools.ant.BuildException - if specified with refid

setLanguage

public void setLanguage(String value)
                 throws org.apache.tools.ant.BuildException
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

public void setFilecomments(String value)
                     throws org.apache.tools.ant.BuildException
Sets comments.

Parameters:
value - new value
Throws:
org.apache.tools.ant.BuildException - if specified with refid

setCompanyname

public void setCompanyname(String value)
                    throws org.apache.tools.ant.BuildException
Sets company name.

Parameters:
value - new value
Throws:
org.apache.tools.ant.BuildException - if specified with refid

setInternalname

public void setInternalname(String value)
                     throws org.apache.tools.ant.BuildException
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

public void setLegalcopyright(String value)
                       throws org.apache.tools.ant.BuildException
Sets legal copyright.

Parameters:
value - new value
Throws:
org.apache.tools.ant.BuildException - if specified with refid

setLegaltrademark

public void setLegaltrademark(String value)
                       throws org.apache.tools.ant.BuildException
Sets legal trademark.

Parameters:
value - new value
Throws:
org.apache.tools.ant.BuildException - if specified with refid

setOriginalfilename

public void setOriginalfilename(String value)
                         throws org.apache.tools.ant.BuildException
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

public void setPrivatebuild(String value)
                     throws org.apache.tools.ant.BuildException
Sets private build.

Parameters:
value - new value
Throws:
org.apache.tools.ant.BuildException - if specified with refid

setProductname

public void setProductname(String value)
                    throws org.apache.tools.ant.BuildException
Sets product name.

Parameters:
value - new value
Throws:
org.apache.tools.ant.BuildException - if specified with refid

setSpecialbuild

public void setSpecialbuild(String value)
                     throws org.apache.tools.ant.BuildException
Sets private build.

Parameters:
value - new value
Throws:
org.apache.tools.ant.BuildException - if specified with refid

writeResource

public void writeResource(Writer writer,
                          org.apache.tools.ant.Project p,
                          String executableName)
                   throws IOException
Writes windows resource

Parameters:
writer - writer, may not be null.
project - project, may not be null
executableName - name of executable
Throws:
IOException