org.pf.tools.cda.base.model
Class ClassFileVersion

java.lang.Object
  extended by org.pf.tools.cda.base.model.ClassFileVersion

public class ClassFileVersion
extends java.lang.Object

represents the major and minor version of a class file and is capable to map it to a Java version.

Version:
1.0
Author:
M.Duchrow

Constructor Summary
ClassFileVersion(int major, int minor)
          Initialize the new instance with mahor and miror version.
 
Method Summary
 java.lang.String asString()
          Returns the major and minor version as string separated by a dot.
 boolean equals(java.lang.Object obj)
           
 org.pf.text.Version getMinimumJVMVersion()
          Returns the minimum JVM version that is necessary to execute a class file with this class file version.
 int hashCode()
           
 boolean isGreaterThan(ClassFileVersion version)
          Returns true if this class file version is greater than the given one.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassFileVersion

public ClassFileVersion(int major,
                        int minor)
Initialize the new instance with mahor and miror version.

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

asString

public java.lang.String asString()
Returns the major and minor version as string separated by a dot. Example: "48.0"


getMinimumJVMVersion

public org.pf.text.Version getMinimumJVMVersion()
Returns the minimum JVM version that is necessary to execute a class file with this class file version.


isGreaterThan

public boolean isGreaterThan(ClassFileVersion version)
Returns true if this class file version is greater than the given one.


equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object