/** * Copyright (c) 2013 CEA LIST * * 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: * CEA LIST - Initial API and implementation * */ package org.eclipse.papyrus.C_Cpp; 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 'Visibility Kind', * and utility methods for working with them. * * @see org.eclipse.papyrus.C_Cpp.C_CppPackage#getVisibilityKind() * @model * @generated */ public enum VisibilityKind implements Enumerator { /** * The 'Private' literal object. * * * @see #PRIVATE_VALUE * @generated * @ordered */ PRIVATE(0, "private", "private"), //$NON-NLS-1$ //$NON-NLS-2$ /** * The 'Protected' literal object. * * * @see #PROTECTED_VALUE * @generated * @ordered */ PROTECTED(1, "protected", "protected"), //$NON-NLS-1$ //$NON-NLS-2$ /** * The 'Public' literal object. * * * @see #PUBLIC_VALUE * @generated * @ordered */ PUBLIC(2, "public", "public"); //$NON-NLS-1$ //$NON-NLS-2$ /** * The 'Private' literal value. * *

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

* * @see #PRIVATE * @model name="private" * @generated * @ordered */ public static final int PRIVATE_VALUE = 0; /** * The 'Protected' literal value. * *

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

* * @see #PROTECTED * @model name="protected" * @generated * @ordered */ public static final int PROTECTED_VALUE = 1; /** * The 'Public' literal value. * *

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

* * @see #PUBLIC * @model name="public" * @generated * @ordered */ public static final int PUBLIC_VALUE = 2; /** * An array of all the 'Visibility Kind' enumerators. * * * @generated */ private static final VisibilityKind[] VALUES_ARRAY = new VisibilityKind[] { PRIVATE, PROTECTED, PUBLIC, }; /** * A public read-only list of all the 'Visibility Kind' enumerators. * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Visibility Kind' literal with the specified literal value. * * * @generated */ public static VisibilityKind get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { VisibilityKind result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Visibility Kind' literal with the specified name. * * * @generated */ public static VisibilityKind getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { VisibilityKind result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Visibility Kind' literal with the specified integer value. * * * @generated */ public static VisibilityKind get(int value) { switch (value) { case PRIVATE_VALUE: return PRIVATE; case PROTECTED_VALUE: return PROTECTED; case PUBLIC_VALUE: return PUBLIC; } return null; } /** * * * @generated */ private final int value; /** * * * @generated */ private final String name; /** * * * @generated */ private final String literal; /** * Only this class can construct instances. * * * @generated */ private VisibilityKind(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * * * @generated */ public int getValue() { return value; } /** * * * @generated */ public String getName() { return name; } /** * * * @generated */ public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * * * @generated */ @Override public String toString() { return literal; } } //VisibilityKind