com.caucho.j2ee
Enum J2EEVersion

java.lang.Object
  extended by java.lang.Enum<J2EEVersion>
      extended by com.caucho.j2ee.J2EEVersion
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<J2EEVersion>

public enum J2EEVersion
extends java.lang.Enum<J2EEVersion>

The J2EE version of a configuration file.


Enum Constant Summary
J2EE12
           
J2EE13
           
J2EE14
           
JAVAEE5
           
RESIN
           
 
Field Summary
static java.lang.String J2EE_NAMESPACE
           
static java.lang.String JAVAEE_NAMESPACE
           
static java.lang.String RESIN_NAMESPACE
           
 
Method Summary
static J2EEVersion getJ2EEVersion(org.w3c.dom.Element top)
          Return a J2EEVersion based on the namespace, the version attribute, and the doctype.
abstract  boolean hasFeaturesOf(J2EEVersion version)
          Returns true if this version is equal to or more recent than the passed version.
static J2EEVersion valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static J2EEVersion[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

J2EE12

public static final J2EEVersion J2EE12

J2EE13

public static final J2EEVersion J2EE13

J2EE14

public static final J2EEVersion J2EE14

JAVAEE5

public static final J2EEVersion JAVAEE5

RESIN

public static final J2EEVersion RESIN
Field Detail

J2EE_NAMESPACE

public static final java.lang.String J2EE_NAMESPACE
See Also:
Constant Field Values

JAVAEE_NAMESPACE

public static final java.lang.String JAVAEE_NAMESPACE
See Also:
Constant Field Values

RESIN_NAMESPACE

public static final java.lang.String RESIN_NAMESPACE
See Also:
Constant Field Values
Method Detail

values

public static J2EEVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (J2EEVersion c : J2EEVersion.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static J2EEVersion valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getJ2EEVersion

public static J2EEVersion getJ2EEVersion(org.w3c.dom.Element top)
Return a J2EEVersion based on the namespace, the version attribute, and the doctype.

Parameters:
top - the top level element of a configuration file.

hasFeaturesOf

public abstract boolean hasFeaturesOf(J2EEVersion version)
Returns true if this version is equal to or more recent than the passed version.