mirror of https://github.com/Minres/RDL-Editor.git
364 lines
7.6 KiB
Java
364 lines
7.6 KiB
Java
|
/**
|
||
|
* 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;
|
||
|
|
||
|
/**
|
||
|
* <!-- begin-user-doc -->
|
||
|
* A representation of the literals of the enumeration '<em><b>Property Type Name</b></em>',
|
||
|
* and utility methods for working with them.
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see com.minres.rdl.rdl.RdlPackage#getPropertyTypeName()
|
||
|
* @model
|
||
|
* @generated
|
||
|
*/
|
||
|
public enum PropertyTypeName implements Enumerator
|
||
|
{
|
||
|
/**
|
||
|
* The '<em><b>STRING</b></em>' literal object.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #STRING_VALUE
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
STRING(0, "STRING", "string"),
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>NUMBER</b></em>' literal object.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #NUMBER_VALUE
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
NUMBER(1, "NUMBER", "number"),
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>BOOLEAN</b></em>' literal object.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #BOOLEAN_VALUE
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
BOOLEAN(2, "BOOLEAN", "boolean"),
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>ADDRMAP</b></em>' literal object.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #ADDRMAP_VALUE
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
ADDRMAP(3, "ADDRMAP", "addrmap"),
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>REG</b></em>' literal object.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #REG_VALUE
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
REG(4, "REG", "reg"),
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>REGFILE</b></em>' literal object.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #REGFILE_VALUE
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
REGFILE(5, "REGFILE", "regfile"),
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>FIELD</b></em>' literal object.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #FIELD_VALUE
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
FIELD(6, "FIELD", "field"),
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>REF</b></em>' literal object.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #REF_VALUE
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
REF(7, "REF", "ref");
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>STRING</b></em>' literal value.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #STRING
|
||
|
* @model literal="string"
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
public static final int STRING_VALUE = 0;
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>NUMBER</b></em>' literal value.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #NUMBER
|
||
|
* @model literal="number"
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
public static final int NUMBER_VALUE = 1;
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>BOOLEAN</b></em>' literal value.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #BOOLEAN
|
||
|
* @model literal="boolean"
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
public static final int BOOLEAN_VALUE = 2;
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>ADDRMAP</b></em>' literal value.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #ADDRMAP
|
||
|
* @model literal="addrmap"
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
public static final int ADDRMAP_VALUE = 3;
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>REG</b></em>' literal value.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #REG
|
||
|
* @model literal="reg"
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
public static final int REG_VALUE = 4;
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>REGFILE</b></em>' literal value.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #REGFILE
|
||
|
* @model literal="regfile"
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
public static final int REGFILE_VALUE = 5;
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>FIELD</b></em>' literal value.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #FIELD
|
||
|
* @model literal="field"
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
public static final int FIELD_VALUE = 6;
|
||
|
|
||
|
/**
|
||
|
* The '<em><b>REF</b></em>' literal value.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @see #REF
|
||
|
* @model literal="ref"
|
||
|
* @generated
|
||
|
* @ordered
|
||
|
*/
|
||
|
public static final int REF_VALUE = 7;
|
||
|
|
||
|
/**
|
||
|
* An array of all the '<em><b>Property Type Name</b></em>' enumerators.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @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 '<em><b>Property Type Name</b></em>' enumerators.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @generated
|
||
|
*/
|
||
|
public static final List<PropertyTypeName> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
|
||
|
|
||
|
/**
|
||
|
* Returns the '<em><b>Property Type Name</b></em>' literal with the specified literal value.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @param literal the literal.
|
||
|
* @return the matching enumerator or <code>null</code>.
|
||
|
* @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 '<em><b>Property Type Name</b></em>' literal with the specified name.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @param name the name.
|
||
|
* @return the matching enumerator or <code>null</code>.
|
||
|
* @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 '<em><b>Property Type Name</b></em>' literal with the specified integer value.
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @param value the integer value.
|
||
|
* @return the matching enumerator or <code>null</code>.
|
||
|
* @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;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* <!-- 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 PropertyTypeName(int value, String name, String literal)
|
||
|
{
|
||
|
this.value = value;
|
||
|
this.name = name;
|
||
|
this.literal = literal;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @generated
|
||
|
*/
|
||
|
@Override
|
||
|
public int getValue()
|
||
|
{
|
||
|
return value;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @generated
|
||
|
*/
|
||
|
@Override
|
||
|
public String getName()
|
||
|
{
|
||
|
return name;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* <!-- begin-user-doc -->
|
||
|
* <!-- end-user-doc -->
|
||
|
* @generated
|
||
|
*/
|
||
|
@Override
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
} //PropertyTypeName
|