/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.jbpm.jpdl32;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Config Type</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.jbpm.jpdl32.jpdl32Package#getConfigType()
* @model extendedMetaData="name='configType'"
* @generated
*/
public enum ConfigType implements Enumerator {
/**
* The '<em><b>Field</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #FIELD_VALUE
* @generated
* @ordered
*/
FIELD(0, "field", "field"),
/**
* The '<em><b>Bean</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #BEAN_VALUE
* @generated
* @ordered
*/
BEAN(1, "bean", "bean"),
/**
* The '<em><b>Constructor</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #CONSTRUCTOR_VALUE
* @generated
* @ordered
*/
CONSTRUCTOR(2, "constructor", "constructor"),
/**
* The '<em><b>Configuration Property</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #CONFIGURATION_PROPERTY_VALUE
* @generated
* @ordered
*/
CONFIGURATION_PROPERTY(3, "configurationProperty", "configuration-property");
/**
* The '<em><b>Field</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Field</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #FIELD
* @model name="field"
* @generated
* @ordered
*/
public static final int FIELD_VALUE = 0;
/**
* The '<em><b>Bean</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Bean</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #BEAN
* @model name="bean"
* @generated
* @ordered
*/
public static final int BEAN_VALUE = 1;
/**
* The '<em><b>Constructor</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Constructor</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #CONSTRUCTOR
* @model name="constructor"
* @generated
* @ordered
*/
public static final int CONSTRUCTOR_VALUE = 2;
/**
* The '<em><b>Configuration Property</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Configuration Property</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #CONFIGURATION_PROPERTY
* @model name="configurationProperty" literal="configuration-property"
* @generated
* @ordered
*/
public static final int CONFIGURATION_PROPERTY_VALUE = 3;
/**
* An array of all the '<em><b>Config Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final ConfigType[] VALUES_ARRAY =
new ConfigType[] {
FIELD,
BEAN,
CONSTRUCTOR,
CONFIGURATION_PROPERTY,
};
/**
* A public read-only list of all the '<em><b>Config Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<ConfigType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Config Type</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static ConfigType get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
ConfigType result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Config Type</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static ConfigType getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
ConfigType result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Config Type</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static ConfigType get(int value) {
switch (value) {
case FIELD_VALUE: return FIELD;
case BEAN_VALUE: return BEAN;
case CONSTRUCTOR_VALUE: return CONSTRUCTOR;
case CONFIGURATION_PROPERTY_VALUE: return CONFIGURATION_PROPERTY;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private ConfigType(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //ConfigType
|