/******************************************************************************* * Copyright (c) 2011 Vrije Universiteit Brussel. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * Contributors: * Dennis Wagelaar, Vrije Universiteit Brussel - initial API and * implementation and/or initial documentation *******************************************************************************/ package org.eclipse.m2m.atl.emftvm; 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 'Feature Tag', * and utility methods for working with them. * @author Dennis Wagelaar * * @see org.eclipse.m2m.atl.emftvm.EmftvmPackage#getFeatureTag() * @model * @generated */ public enum FeatureTag implements Enumerator { /** * The 'Field' literal object. * * * @see #FIELD_VALUE * @generated * @ordered */ FIELD(0, "Field", "Field"), /** * The 'Static Field' literal object. * * * @see #STATIC_FIELD_VALUE * @generated * @ordered */ STATIC_FIELD(1, "StaticField", "StaticField"), /** * The 'Operation' literal object. * * * @see #OPERATION_VALUE * @generated * @ordered */ OPERATION(2, "Operation", "Operation"), /** * The 'Static Operation' literal object. * * * @see #STATIC_OPERATION_VALUE * @generated * @ordered */ STATIC_OPERATION(3, "StaticOperation", "StaticOperation"), /** * The 'Query Operation' literal object. * * * @see #QUERY_OPERATION_VALUE * @generated * @ordered */ QUERY_OPERATION(4, "QueryOperation", "QueryOperation"), /** * The 'Static Query Operation' literal object. * * * @see #STATIC_QUERY_OPERATION_VALUE * @generated * @ordered */ STATIC_QUERY_OPERATION(5, "StaticQueryOperation", "StaticQueryOperation"); /** * The 'Field' literal value. * *
* If the meaning of 'Field' literal object isn't clear, * there really should be more of a description here... *
* * @see #FIELD * @model name="Field" * @generated * @ordered */ public static final int FIELD_VALUE = 0; /** * The 'Static Field' literal value. * ** If the meaning of 'Static Field' literal object isn't clear, * there really should be more of a description here... *
* * @see #STATIC_FIELD * @model name="StaticField" * @generated * @ordered */ public static final int STATIC_FIELD_VALUE = 1; /** * The 'Operation' literal value. * ** If the meaning of 'Operation' literal object isn't clear, * there really should be more of a description here... *
* * @see #OPERATION * @model name="Operation" * @generated * @ordered */ public static final int OPERATION_VALUE = 2; /** * The 'Static Operation' literal value. * ** If the meaning of 'Static Operation' literal object isn't clear, * there really should be more of a description here... *
* * @see #STATIC_OPERATION * @model name="StaticOperation" * @generated * @ordered */ public static final int STATIC_OPERATION_VALUE = 3; /** * The 'Query Operation' literal value. * ** If the meaning of 'Query Operation' literal object isn't clear, * there really should be more of a description here... *
* * @see #QUERY_OPERATION * @model name="QueryOperation" * @generated * @ordered */ public static final int QUERY_OPERATION_VALUE = 4; /** * The 'Static Query Operation' literal value. * ** If the meaning of 'Static Query Operation' literal object isn't clear, * there really should be more of a description here... *
* * @see #STATIC_QUERY_OPERATION * @model name="StaticQueryOperation" * @generated * @ordered */ public static final int STATIC_QUERY_OPERATION_VALUE = 5; /** * An array of all the 'Feature Tag' enumerators. * * * @generated */ private static final FeatureTag[] VALUES_ARRAY = new FeatureTag[] { FIELD, STATIC_FIELD, OPERATION, STATIC_OPERATION, QUERY_OPERATION, STATIC_QUERY_OPERATION, }; /** * A public read-only list of all the 'Feature Tag' enumerators. * * * @generated */ public static final Listnull
.
* @generated
*/
public static FeatureTag get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
FeatureTag result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Feature Tag' literal with the specified name.
*
* @param name the literal name
* @return the 'Feature Tag' literal with the specified name.
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static FeatureTag getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
FeatureTag result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Feature Tag' literal with the specified integer value.
*
* @param value the literal integer value
* @return the 'Feature Tag' literal with the specified integer value.
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static FeatureTag get(int value) {
switch (value) {
case FIELD_VALUE: return FIELD;
case STATIC_FIELD_VALUE: return STATIC_FIELD;
case OPERATION_VALUE: return OPERATION;
case STATIC_OPERATION_VALUE: return STATIC_OPERATION;
case QUERY_OPERATION_VALUE: return QUERY_OPERATION;
case STATIC_QUERY_OPERATION_VALUE: return STATIC_QUERY_OPERATION;
}
return null;
}
/**
*
* The literal integer value.
*
* @generated
*/
private final int value;
/**
*
* The literal name.
*
* @generated
*/
private final String name;
/**
*
* The literal string value.
*
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
*
*
* @generated
*/
private FeatureTag(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
*
* Returns the literal integer value.
* @return the literal integer value.
*
* @generated
*/
public int getValue() {
return value;
}
/**
*
* Returns the literal name.
* @return the literal name.
*
* @generated
*/
public String getName() {
return name;
}
/**
*
* Returns the literal string value.
* @return the literal string value.
*
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
*
* @return the literal value of the enumerator, which is its string representation.
*
* @generated
*/
@Override
public String toString() {
return literal;
}
} //FeatureTag