KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * <copyright>
3  * </copyright>
4  *
5  * $Id: GenPropertyKind.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 Property Kind</b></em>',
18  * and utility methods for working with them.
19  * <!-- end-user-doc -->
20  * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenPropertyKind()
21  * @model
22  * @generated
23  */

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

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

46   public static final int READONLY = 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>Editable</b></em>' literal object.
61    * <!-- begin-user-doc -->
62    * <p>
63    * If the meaning of '<em><b>EDITABLE</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 #EDITABLE
68    * @generated
69    * @ordered
70    */

71   public static final GenPropertyKind EDITABLE_LITERAL = new GenPropertyKind(EDITABLE, "Editable");
72
73   /**
74    * The '<em><b>Readonly</b></em>' literal object.
75    * <!-- begin-user-doc -->
76    * <p>
77    * If the meaning of '<em><b>READONLY</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 #READONLY
82    * @generated
83    * @ordered
84    */

85   public static final GenPropertyKind READONLY_LITERAL = new GenPropertyKind(READONLY, "Readonly");
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 GenPropertyKind NONE_LITERAL = new GenPropertyKind(NONE, "None");
100
101   /**
102    * An array of all the '<em><b>Gen Property Kind</b></em>' enumerators.
103    * <!-- begin-user-doc -->
104    * <!-- end-user-doc -->
105    * @generated
106    */

107   private static final GenPropertyKind[] VALUES_ARRAY =
108     new GenPropertyKind[]
109     {
110       EDITABLE_LITERAL,
111       READONLY_LITERAL,
112       NONE_LITERAL,
113     };
114
115   /**
116    * A public read-only list of all the '<em><b>Gen Property 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 Property Kind</b></em>' literal with the specified name.
125    * <!-- begin-user-doc -->
126    * <!-- end-user-doc -->
127    * @generated
128    */

129   public static GenPropertyKind get(String JavaDoc name)
130   {
131     for (int i = 0; i < VALUES_ARRAY.length; ++i)
132     {
133       GenPropertyKind 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 Property Kind</b></em>' literal with the specified value.
144    * <!-- begin-user-doc -->
145    * <!-- end-user-doc -->
146    * @generated
147    */

148   public static GenPropertyKind get(int value)
149   {
150     switch (value)
151     {
152       case EDITABLE: return EDITABLE_LITERAL;
153       case READONLY: return READONLY_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 GenPropertyKind(int value, String JavaDoc name)
166   {
167     super(value, name);
168   }
169
170 } //GenPropertyKind
171
Popular Tags