blob: 73d943b9d061d6dce66dda5196baec796ac2ea26 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009, 2019 Xored Software Inc and others.
* 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-v20.html
*
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.rcptt.ecl.debug.model;
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>Variable Kind</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.rcptt.ecl.debug.model.ModelPackage#getVariableKind()
* @model
* @generated
*/
public enum VariableKind implements Enumerator {
/**
* The '<em><b>Variable</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #VARIABLE_VALUE
* @generated
* @ordered
*/
VARIABLE(0, "Variable", "Variable"),
/**
* The '<em><b>Command</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #COMMAND_VALUE
* @generated
* @ordered
*/
COMMAND(1, "Command", "Command"),
/**
* The '<em><b>Local</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #LOCAL_VALUE
* @generated
* @ordered
*/
LOCAL(2, "Local", "Local"), /**
* The '<em><b>Argument</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #ARGUMENT_VALUE
* @generated
* @ordered
*/
ARGUMENT(4, "Argument", "Argument"),
/**
* The '<em><b>Object</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OBJECT_VALUE
* @generated
* @ordered
*/
OBJECT(5, "Object", "Object"), /**
* 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>Reference</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #REFERENCE_VALUE
* @generated
* @ordered
*/
REFERENCE(7, "Reference", "Reference");
/**
* The '<em><b>Variable</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Variable</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #VARIABLE
* @model name="Variable"
* @generated
* @ordered
*/
public static final int VARIABLE_VALUE = 0;
/**
* The '<em><b>Command</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Command</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #COMMAND
* @model name="Command"
* @generated
* @ordered
*/
public static final int COMMAND_VALUE = 1;
/**
* The '<em><b>Local</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Local</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #LOCAL
* @model name="Local"
* @generated
* @ordered
*/
public static final int LOCAL_VALUE = 2;
/**
* The '<em><b>Argument</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Argument</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #ARGUMENT
* @model name="Argument"
* @generated
* @ordered
*/
public static final int ARGUMENT_VALUE = 4;
/**
* The '<em><b>Object</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Object</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OBJECT
* @model name="Object"
* @generated
* @ordered
*/
public static final int OBJECT_VALUE = 5;
/**
* 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 = 6;
/**
* The '<em><b>Reference</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Reference</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #REFERENCE
* @model name="Reference"
* @generated
* @ordered
*/
public static final int REFERENCE_VALUE = 7;
/**
* An array of all the '<em><b>Variable Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final VariableKind[] VALUES_ARRAY =
new VariableKind[] {
VARIABLE,
COMMAND,
LOCAL,
ARGUMENT,
OBJECT,
FIELD,
REFERENCE,
};
/**
* A public read-only list of all the '<em><b>Variable Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<VariableKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Variable Kind</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static VariableKind get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
VariableKind result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Variable Kind</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static VariableKind getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
VariableKind result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Variable Kind</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static VariableKind get(int value) {
switch (value) {
case VARIABLE_VALUE: return VARIABLE;
case COMMAND_VALUE: return COMMAND;
case LOCAL_VALUE: return LOCAL;
case ARGUMENT_VALUE: return ARGUMENT;
case OBJECT_VALUE: return OBJECT;
case FIELD_VALUE: return FIELD;
case REFERENCE_VALUE: return REFERENCE;
}
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 VariableKind(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;
}
} //VariableKind