org.schmant.project.eclipse
Class JdkCompliance

java.lang.Object
  extended by org.schmant.project.eclipse.JdkCompliance

public class JdkCompliance
extends Object

This immutable object contains information on the JDK compliance for an Eclipse workspace or for a single Java project.

Since:
1.1
Author:
Karl Gustafsson

Constructor Summary
JdkCompliance(JdkVersion compilerCompliance, JdkVersion generatedClassFile, JdkVersion source)
          Create a new Eclipse workspace / project JDK compliance object.
 
Method Summary
 boolean equals(Object o)
           
 JdkVersion getCompilerComplianceLevel()
          Get the compiler compliance level.
 JdkVersion getGeneratedClassFileCompatibility()
          Get the generated class file compatibility level.
 JdkVersion getSourceCompatibility()
          Get the source code compatibility level.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JdkCompliance

public JdkCompliance(JdkVersion compilerCompliance,
                     JdkVersion generatedClassFile,
                     JdkVersion source)
              throws IllegalArgumentException
Create a new Eclipse workspace / project JDK compliance object.

Parameters:
compilerCompliance - The compiler compliance level.
generatedClassFile - The generated class file compliance level. This must be at least as high as the compiler compliance level.
source - The source code compatibility level. This must be at most the compiler compliance level.
Throws:
IllegalArgumentException - If the generated class file level is lower than or if the source code level is higher than the compiler compliance level.
Method Detail

getCompilerComplianceLevel

public JdkVersion getCompilerComplianceLevel()
Get the compiler compliance level.

Returns:
The compiler compliance level.

getGeneratedClassFileCompatibility

public JdkVersion getGeneratedClassFileCompatibility()
Get the generated class file compatibility level. This is at least the compiler compliance level.

Returns:
The generated class file compatibility level.

getSourceCompatibility

public JdkVersion getSourceCompatibility()
Get the source code compatibility level. This may be up to and including the compiler compliance level.

Returns:
The source code compatibility level.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object