/** * generated by Xtext 2.26.0 */ package com.minres.rdl.rdl; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * * A representation of the literals of the enumeration 'Property Type Name', * and utility methods for working with them. * * @see com.minres.rdl.rdl.RdlPackage#getPropertyTypeName() * @model * @generated */ public enum PropertyTypeName implements Enumerator { /** * The 'STRING' literal object. * * * @see #STRING_VALUE * @generated * @ordered */ STRING(0, "STRING", "string"), /** * The 'NUMBER' literal object. * * * @see #NUMBER_VALUE * @generated * @ordered */ NUMBER(1, "NUMBER", "number"), /** * The 'BOOLEAN' literal object. * * * @see #BOOLEAN_VALUE * @generated * @ordered */ BOOLEAN(2, "BOOLEAN", "boolean"), /** * The 'ADDRMAP' literal object. * * * @see #ADDRMAP_VALUE * @generated * @ordered */ ADDRMAP(3, "ADDRMAP", "addrmap"), /** * The 'REG' literal object. * * * @see #REG_VALUE * @generated * @ordered */ REG(4, "REG", "reg"), /** * The 'REGFILE' literal object. * * * @see #REGFILE_VALUE * @generated * @ordered */ REGFILE(5, "REGFILE", "regfile"), /** * The 'FIELD' literal object. * * * @see #FIELD_VALUE * @generated * @ordered */ FIELD(6, "FIELD", "field"), /** * The 'REF' literal object. * * * @see #REF_VALUE * @generated * @ordered */ REF(7, "REF", "ref"); /** * The 'STRING' literal value. * * * @see #STRING * @model literal="string" * @generated * @ordered */ public static final int STRING_VALUE = 0; /** * The 'NUMBER' literal value. * * * @see #NUMBER * @model literal="number" * @generated * @ordered */ public static final int NUMBER_VALUE = 1; /** * The 'BOOLEAN' literal value. * * * @see #BOOLEAN * @model literal="boolean" * @generated * @ordered */ public static final int BOOLEAN_VALUE = 2; /** * The 'ADDRMAP' literal value. * * * @see #ADDRMAP * @model literal="addrmap" * @generated * @ordered */ public static final int ADDRMAP_VALUE = 3; /** * The 'REG' literal value. * * * @see #REG * @model literal="reg" * @generated * @ordered */ public static final int REG_VALUE = 4; /** * The 'REGFILE' literal value. * * * @see #REGFILE * @model literal="regfile" * @generated * @ordered */ public static final int REGFILE_VALUE = 5; /** * The 'FIELD' literal value. * * * @see #FIELD * @model literal="field" * @generated * @ordered */ public static final int FIELD_VALUE = 6; /** * The 'REF' literal value. * * * @see #REF * @model literal="ref" * @generated * @ordered */ public static final int REF_VALUE = 7; /** * An array of all the 'Property Type Name' enumerators. * * * @generated */ private static final PropertyTypeName[] VALUES_ARRAY = new PropertyTypeName[] { STRING, NUMBER, BOOLEAN, ADDRMAP, REG, REGFILE, FIELD, REF, }; /** * A public read-only list of all the 'Property Type Name' enumerators. * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Property Type Name' literal with the specified literal value. * * * @param literal the literal. * @return the matching enumerator or null. * @generated */ public static PropertyTypeName get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { PropertyTypeName result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Property Type Name' literal with the specified name. * * * @param name the name. * @return the matching enumerator or null. * @generated */ public static PropertyTypeName getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { PropertyTypeName result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Property Type Name' literal with the specified integer value. * * * @param value the integer value. * @return the matching enumerator or null. * @generated */ public static PropertyTypeName get(int value) { switch (value) { case STRING_VALUE: return STRING; case NUMBER_VALUE: return NUMBER; case BOOLEAN_VALUE: return BOOLEAN; case ADDRMAP_VALUE: return ADDRMAP; case REG_VALUE: return REG; case REGFILE_VALUE: return REGFILE; case FIELD_VALUE: return FIELD; case REF_VALUE: return REF; } return null; } /** * * * @generated */ private final int value; /** * * * @generated */ private final String name; /** * * * @generated */ private final String literal; /** * Only this class can construct instances. * * * @generated */ private PropertyTypeName(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * * * @generated */ @Override public int getValue() { return value; } /** * * * @generated */ @Override public String getName() { return name; } /** * * * @generated */ @Override public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * * * @generated */ @Override public String toString() { return literal; } } //PropertyTypeName