blob: 0cd017434610ed64b5a6b84ba474432122fb0509 [file] [log] [blame]
/**
* *******************************************************************************
* Copyright (c) 2017 Timing-Architects Embedded Systems GmbH and others.
* 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
*
* Generated using Eclipse EMF
*
* *******************************************************************************
*/
package org.eclipse.app4mc.amalthea.generator.configuration;
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>Semaphore Access Type</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.app4mc.amalthea.generator.configuration.RTMGCPackage#getSemaphoreAccessType()
* @model
* @generated
*/
public enum SemaphoreAccessType implements Enumerator {
/**
* The '<em><b>RWper Task</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #RWPER_TASK_VALUE
* @generated
* @ordered
*/
RWPER_TASK(0, "RWperTask", "RWperTask"),
/**
* The '<em><b>RWper Call Sequence</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #RWPER_CALL_SEQUENCE_VALUE
* @generated
* @ordered
*/
RWPER_CALL_SEQUENCE(1, "RWperCallSequence", "RWperCallSequence"),
/**
* The '<em><b>Rand Runnable</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #RAND_RUNNABLE_VALUE
* @generated
* @ordered
*/
RAND_RUNNABLE(2, "RandRunnable", "RandRunnable"),
/**
* The '<em><b>Whole CS</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #WHOLE_CS_VALUE
* @generated
* @ordered
*/
WHOLE_CS(3, "WholeCS", "WholeCS"),
/**
* The '<em><b>Grouped FMLP</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #GROUPED_FMLP_VALUE
* @generated
* @ordered
*/
GROUPED_FMLP(4, "GroupedFMLP", "GroupedFMLP"),
/**
* The '<em><b>Weak FMLP</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #WEAK_FMLP_VALUE
* @generated
* @ordered
*/
WEAK_FMLP(5, "WeakFMLP", "WeakFMLP"),
/**
* The '<em><b>EVA</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #EVA_VALUE
* @generated
* @ordered
*/
EVA(6, "EVA", "EVA");
/**
* The '<em><b>RWper Task</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>RWper Task</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #RWPER_TASK
* @model name="RWperTask"
* @generated
* @ordered
*/
public static final int RWPER_TASK_VALUE = 0;
/**
* The '<em><b>RWper Call Sequence</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>RWper Call Sequence</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #RWPER_CALL_SEQUENCE
* @model name="RWperCallSequence"
* @generated
* @ordered
*/
public static final int RWPER_CALL_SEQUENCE_VALUE = 1;
/**
* The '<em><b>Rand Runnable</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Rand Runnable</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #RAND_RUNNABLE
* @model name="RandRunnable"
* @generated
* @ordered
*/
public static final int RAND_RUNNABLE_VALUE = 2;
/**
* The '<em><b>Whole CS</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Whole CS</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #WHOLE_CS
* @model name="WholeCS"
* @generated
* @ordered
*/
public static final int WHOLE_CS_VALUE = 3;
/**
* The '<em><b>Grouped FMLP</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Grouped FMLP</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #GROUPED_FMLP
* @model name="GroupedFMLP"
* @generated
* @ordered
*/
public static final int GROUPED_FMLP_VALUE = 4;
/**
* The '<em><b>Weak FMLP</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Weak FMLP</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #WEAK_FMLP
* @model name="WeakFMLP"
* @generated
* @ordered
*/
public static final int WEAK_FMLP_VALUE = 5;
/**
* The '<em><b>EVA</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>EVA</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #EVA
* @model
* @generated
* @ordered
*/
public static final int EVA_VALUE = 6;
/**
* An array of all the '<em><b>Semaphore Access Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final SemaphoreAccessType[] VALUES_ARRAY =
new SemaphoreAccessType[] {
RWPER_TASK,
RWPER_CALL_SEQUENCE,
RAND_RUNNABLE,
WHOLE_CS,
GROUPED_FMLP,
WEAK_FMLP,
EVA,
};
/**
* A public read-only list of all the '<em><b>Semaphore Access Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<SemaphoreAccessType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Semaphore Access Type</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 SemaphoreAccessType get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SemaphoreAccessType result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Semaphore Access Type</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 SemaphoreAccessType getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SemaphoreAccessType result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Semaphore Access Type</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 SemaphoreAccessType get(int value) {
switch (value) {
case RWPER_TASK_VALUE: return RWPER_TASK;
case RWPER_CALL_SEQUENCE_VALUE: return RWPER_CALL_SEQUENCE;
case RAND_RUNNABLE_VALUE: return RAND_RUNNABLE;
case WHOLE_CS_VALUE: return WHOLE_CS;
case GROUPED_FMLP_VALUE: return GROUPED_FMLP;
case WEAK_FMLP_VALUE: return WEAK_FMLP;
case EVA_VALUE: return EVA;
}
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 SemaphoreAccessType(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;
}
} //SemaphoreAccessType