Class VersionTask

java.lang.Object
  extended by Task
      extended by VersionTask

public class VersionTask
extends Task

This class exists only for compilation-with-ant purpose. It extends the ant property to report the chosen version number to the compilation process.

Version:
$Revision: 50 $
Author:
Gaurang Mehta, Karan Vahi, Jens-S. Vöckler, Yong Zhao

Field Summary
private  int major
          member variable to obatain the major version number.
private  int minor
          member variable to obatain the minor version number.
private  int patch
          member variable to obatain the patch-level number.
private  String version
          member variable to maintain the version string.
 
Constructor Summary
VersionTask()
           
 
Method Summary
 void execute()
          Executes the ant task, and populates the environmental properties for the current project.
 void init()
          Initializes the member variables for an ant task.
 void setMajor(int major)
          Accessor to set the major version number.
 void setMinor(int minor)
          Accessor to set the minor version number.
 void setPatch(int patch)
          Accessor to set the patch-level number.
 void setVersion(String version)
          Accessor to set the version string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

major

private int major
member variable to obatain the major version number.

See Also:
org.griphyn.common.util.Version#MAJOR

minor

private int minor
member variable to obatain the minor version number.

See Also:
org.griphyn.common.util.Version#MINOR

patch

private int patch
member variable to obatain the patch-level number.

See Also:
org.griphyn.common.util.Version#PLEVEL

version

private String version
member variable to maintain the version string.

See Also:
org.griphyn.common.util.Version#toString()
Constructor Detail

VersionTask

public VersionTask()
Method Detail

setMajor

public void setMajor(int major)
Accessor to set the major version number.

Parameters:
major - is the new major version number.

setMinor

public void setMinor(int minor)
Accessor to set the minor version number.

Parameters:
minor - is the new minor version number.

setPatch

public void setPatch(int patch)
Accessor to set the patch-level number.

Parameters:
patch - is the new patch-level number.

setVersion

public void setVersion(String version)
Accessor to set the version string. No matching is done to verify consistency with the simple numbers.

Parameters:
version - is the version string.

init

public void init()
          throws BuildException
Initializes the member variables for an ant task.

Throws:
BuildException - if something goes bump with ant.
See Also:
org.griphyn.common.util.Version

execute

public void execute()
             throws BuildException
Executes the ant task, and populates the environmental properties for the current project. The environmental properties propagate the Java-encoded version number of the software into the build process.

Throws:
BuildException - if something goes bump with ant.


Copyright © 2011 The University of Southern California. All Rights Reserved.