FileDocCategorySizeDatePackage
ModuleType.javaAPI DocGlassfish v2 API4919Fri May 04 22:35:48 BST 2007javax.enterprise.deploy.shared

ModuleType

public class ModuleType extends Object
Class ModuleTypes defines enumeration values for the J2EE module types.
author
Rebecca Searls

Fields Summary
private int
value
public static final ModuleType
EAR
The module is an EAR archive.
public static final ModuleType
EJB
The module is an Enterprise Java Bean archive.
public static final ModuleType
CAR
The module is an Client Application archive.
public static final ModuleType
RAR
The module is an Connector archive.
public static final ModuleType
WAR
The module is an Web Application archive.
private static final String[]
stringTable
private static final ModuleType[]
enumValueTable
private static final String[]
moduleExtension
Constructors Summary
protected ModuleType(int value)
Construct a new enumeration value with the given integer value.

param
value Integer value.

        

                         
      
       this.value = value;
    
Methods Summary
protected javax.enterprise.deploy.shared.ModuleType[]getEnumValueTable()
Returns the enumeration value table for class ModuleType

   return enumValueTable;
	
public java.lang.StringgetModuleExtension()
Return the file extension string for this enumeration.

   return (moduleExtension[getValue()]);
    
public static javax.enterprise.deploy.shared.ModuleTypegetModuleType(int value)
Return an object of the specified value.

param
value a designator for the object.

   return enumValueTable[value];
    
protected intgetOffset()
Returns the lowest integer value used by this enumeration value's enumeration class.

The default implementation returns 0. If the enumeration class (a subclass of class EnumSyntax) uses integer values starting at other than 0, override this method in the subclass.

return
the offset of the lowest enumeration value.

 	return 0;
    
protected java.lang.String[]getStringTable()
Returns the string table for class ModuleType

   return stringTable;
	
public intgetValue()
Returns this enumeration value's integer value.

return
the value

 	return value;
    
public java.lang.StringtoString()
Return the string name of this ModuleType or the integer value if outside the bounds of the table

    	String[] strTable = getStringTable();
    	int index = value - getOffset();
		if (strTable != null && index >= 0 && index < strTable.length)
        	return strTable[index];
		else
        	return Integer.toString (value);