/******************************************************************************* * 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 v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * 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 'Model Declaration Tag', * and utility methods for working with them. * @author Dennis Wagelaar * * @see org.eclipse.m2m.atl.emftvm.EmftvmPackage#getModelDeclarationTag() * @model * @generated */ public enum ModelDeclarationTag implements Enumerator { /** * The 'Input' literal object. * * * @see #INPUT_VALUE * @generated * @ordered */ INPUT(0, "input", "input"), /** * The 'Inout' literal object. * * * @see #INOUT_VALUE * @generated * @ordered */ INOUT(1, "inout", "inout"), /** * The 'Output' literal object. * * * @see #OUTPUT_VALUE * @generated * @ordered */ OUTPUT(2, "output", "output"); /** * The 'Input' literal value. * *

* If the meaning of 'Input' literal object isn't clear, * there really should be more of a description here... *

* * @see #INPUT * @model name="input" * @generated * @ordered */ public static final int INPUT_VALUE = 0; /** * The 'Inout' literal value. * *

* If the meaning of 'Inout' literal object isn't clear, * there really should be more of a description here... *

* * @see #INOUT * @model name="inout" * @generated * @ordered */ public static final int INOUT_VALUE = 1; /** * The 'Output' literal value. * *

* If the meaning of 'Output' literal object isn't clear, * there really should be more of a description here... *

* * @see #OUTPUT * @model name="output" * @generated * @ordered */ public static final int OUTPUT_VALUE = 2; /** * An array of all the 'Model Declaration Tag' enumerators. * * * @generated */ private static final ModelDeclarationTag[] VALUES_ARRAY = new ModelDeclarationTag[] { INPUT, INOUT, OUTPUT, }; /** * A public read-only list of all the 'Model Declaration Tag' enumerators. * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Model Declaration Tag' literal with the specified literal value. * * @param literal the literal string value * @return the 'Model Declaration Tag' literal with the specified literal value. * * @generated */ public static ModelDeclarationTag get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { ModelDeclarationTag result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Model Declaration Tag' literal with the specified name. * * @param name the literal name * @return the 'Model Declaration Tag' literal with the specified name. * * @generated */ public static ModelDeclarationTag getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { ModelDeclarationTag result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Model Declaration Tag' literal with the specified integer value. * * @param value the literal integer value * @return the 'Model Declaration Tag' literal with the specified integer value. * * @generated */ public static ModelDeclarationTag get(int value) { switch (value) { case INPUT_VALUE: return INPUT; case INOUT_VALUE: return INOUT; case OUTPUT_VALUE: return OUTPUT; } 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 ModelDeclarationTag(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; } } //ModelDeclarationTag