KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > codegen > ecore > genmodel > GenProviderKind


1 /**
2  * <copyright>
3  * </copyright>
4  *
5  * $Id: GenProviderKind.java,v 1.1 2004/03/06 17:31:31 marcelop Exp $
6  */

7 package org.eclipse.emf.codegen.ecore.genmodel;
8
9 import java.util.Arrays JavaDoc;
10 import java.util.Collections JavaDoc;
11 import java.util.List JavaDoc;
12
13 import org.eclipse.emf.common.util.AbstractEnumerator;
14
15 /**
16  * <!-- begin-user-doc -->
17  * A representation of the literals of the enumeration '<em><b>Gen Provider Kind</b></em>',
18  * and utility methods for working with them.
19  * <!-- end-user-doc -->
20  * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenProviderKind()
21  * @model
22  * @generated
23  */

24 public final class GenProviderKind extends AbstractEnumerator
25 {
26   /**
27    * The '<em><b>Singleton</b></em>' literal value.
28    * <!-- begin-user-doc -->
29    * <!-- end-user-doc -->
30    * @see #SINGLETON_LITERAL
31    * @model name="Singleton"
32    * @generated
33    * @ordered
34    */

35   public static final int SINGLETON = 0;
36
37   /**
38    * The '<em><b>Stateful</b></em>' literal value.
39    * <!-- begin-user-doc -->
40    * <!-- end-user-doc -->
41    * @see #STATEFUL_LITERAL
42    * @model name="Stateful"
43    * @generated
44    * @ordered
45    */

46   public static final int STATEFUL = 1;
47
48   /**
49    * The '<em><b>None</b></em>' literal value.
50    * <!-- begin-user-doc -->
51    * <!-- end-user-doc -->
52    * @see #NONE_LITERAL
53    * @model name="None"
54    * @generated
55    * @ordered
56    */

57   public static final int NONE = 2;
58
59   /**
60    * The '<em><b>Singleton</b></em>' literal object.
61    * <!-- begin-user-doc -->
62    * <p>
63    * If the meaning of '<em><b>SINGLETON</b></em>' literal object isn't clear,
64    * there really should be more of a description here...
65    * </p>
66    * <!-- end-user-doc -->
67    * @see #SINGLETON
68    * @generated
69    * @ordered
70    */

71   public static final GenProviderKind SINGLETON_LITERAL = new GenProviderKind(SINGLETON, "Singleton");
72
73   /**
74    * The '<em><b>Stateful</b></em>' literal object.
75    * <!-- begin-user-doc -->
76    * <p>
77    * If the meaning of '<em><b>STATEFUL</b></em>' literal object isn't clear,
78    * there really should be more of a description here...
79    * </p>
80    * <!-- end-user-doc -->
81    * @see #STATEFUL
82    * @generated
83    * @ordered
84    */

85   public static final GenProviderKind STATEFUL_LITERAL = new GenProviderKind(STATEFUL, "Stateful");
86
87   /**
88    * The '<em><b>None</b></em>' literal object.
89    * <!-- begin-user-doc -->
90    * <p>
91    * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear,
92    * there really should be more of a description here...
93    * </p>
94    * <!-- end-user-doc -->
95    * @see #NONE
96    * @generated
97    * @ordered
98    */

99   public static final GenProviderKind NONE_LITERAL = new GenProviderKind(NONE, "None");
100
101   /**
102    * An array of all the '<em><b>Gen Provider Kind</b></em>' enumerators.
103    * <!-- begin-user-doc -->
104    * <!-- end-user-doc -->
105    * @generated
106    */

107   private static final GenProviderKind[] VALUES_ARRAY =
108     new GenProviderKind[]
109     {
110       SINGLETON_LITERAL,
111       STATEFUL_LITERAL,
112       NONE_LITERAL,
113     };
114
115   /**
116    * A public read-only list of all the '<em><b>Gen Provider Kind</b></em>' enumerators.
117    * <!-- begin-user-doc -->
118    * <!-- end-user-doc -->
119    * @generated
120    */

121   public static final List JavaDoc VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
122
123   /**
124    * Returns the '<em><b>Gen Provider Kind</b></em>' literal with the specified name.
125    * <!-- begin-user-doc -->
126    * <!-- end-user-doc -->
127    * @generated
128    */

129   public static GenProviderKind get(String JavaDoc name)
130   {
131     for (int i = 0; i < VALUES_ARRAY.length; ++i)
132     {
133       GenProviderKind result = VALUES_ARRAY[i];
134       if (result.toString().equals(name))
135       {
136         return result;
137       }
138     }
139     return null;
140   }
141
142   /**
143    * Returns the '<em><b>Gen Provider Kind</b></em>' literal with the specified value.
144    * <!-- begin-user-doc -->
145    * <!-- end-user-doc -->
146    * @generated
147    */

148   public static GenProviderKind get(int value)
149   {
150     switch (value)
151     {
152       case SINGLETON: return SINGLETON_LITERAL;
153       case STATEFUL: return STATEFUL_LITERAL;
154       case NONE: return NONE_LITERAL;
155     }
156     return null;
157   }
158
159   /**
160    * Only this class can construct instances.
161    * <!-- begin-user-doc -->
162    * <!-- end-user-doc -->
163    * @generated
164    */

165   private GenProviderKind(int value, String JavaDoc name)
166   {
167     super(value, name);
168   }
169
170 } //GenProviderKind
171
Popular Tags