KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: GenResourceKind.java,v 1.3 2005/06/08 06:18:44 nickb Exp $
16  */

17 package org.eclipse.emf.codegen.ecore.genmodel;
18
19 import java.util.Arrays JavaDoc;
20 import java.util.Collections JavaDoc;
21 import java.util.List JavaDoc;
22
23 import org.eclipse.emf.common.util.AbstractEnumerator;
24
25 /**
26  * <!-- begin-user-doc -->
27  * A representation of the literals of the enumeration '<em><b>Gen Resource Kind</b></em>',
28  * and utility methods for working with them.
29  * <!-- end-user-doc -->
30  * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenResourceKind()
31  * @model
32  * @generated
33  */

34 public final class GenResourceKind extends AbstractEnumerator
35 {
36   /**
37    * The '<em><b>None</b></em>' literal value.
38    * <!-- begin-user-doc -->
39    * <!-- end-user-doc -->
40    * @see #NONE_LITERAL
41    * @model name="None"
42    * @generated
43    * @ordered
44    */

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

56   public static final int BASIC = 1;
57
58   /**
59    * The '<em><b>XMI</b></em>' literal value.
60    * <!-- begin-user-doc -->
61    * <!-- end-user-doc -->
62    * @see #XMI_LITERAL
63    * @model
64    * @generated
65    * @ordered
66    */

67   public static final int XMI = 2;
68
69   /**
70    * The '<em><b>XML</b></em>' literal value.
71    * <!-- begin-user-doc -->
72    * <!-- end-user-doc -->
73    * @see #XML_LITERAL
74    * @model
75    * @generated
76    * @ordered
77    */

78   public static final int XML = 3;
79
80   /**
81    * The '<em><b>None</b></em>' literal object.
82    * <!-- begin-user-doc -->
83    * <p>
84    * If the meaning of '<em><b>None</b></em>' literal object isn't clear,
85    * there really should be more of a description here...
86    * </p>
87    * <!-- end-user-doc -->
88    * @see #NONE
89    * @generated
90    * @ordered
91    */

92   public static final GenResourceKind NONE_LITERAL = new GenResourceKind(NONE, "None");
93
94   /**
95    * The '<em><b>Basic</b></em>' literal object.
96    * <!-- begin-user-doc -->
97    * <p>
98    * If the meaning of '<em><b>Basic</b></em>' literal object isn't clear,
99    * there really should be more of a description here...
100    * </p>
101    * <!-- end-user-doc -->
102    * @see #BASIC
103    * @generated
104    * @ordered
105    */

106   public static final GenResourceKind BASIC_LITERAL = new GenResourceKind(BASIC, "Basic");
107
108   /**
109    * The '<em><b>XMI</b></em>' literal object.
110    * <!-- begin-user-doc -->
111    * <p>
112    * If the meaning of '<em><b>XMI</b></em>' literal object isn't clear,
113    * there really should be more of a description here...
114    * </p>
115    * <!-- end-user-doc -->
116    * @see #XMI
117    * @generated
118    * @ordered
119    */

120   public static final GenResourceKind XMI_LITERAL = new GenResourceKind(XMI, "XMI");
121
122   /**
123    * The '<em><b>XML</b></em>' literal object.
124    * <!-- begin-user-doc -->
125    * <p>
126    * If the meaning of '<em><b>XML</b></em>' literal object isn't clear,
127    * there really should be more of a description here...
128    * </p>
129    * <!-- end-user-doc -->
130    * @see #XML
131    * @generated
132    * @ordered
133    */

134   public static final GenResourceKind XML_LITERAL = new GenResourceKind(XML, "XML");
135
136   /**
137    * An array of all the '<em><b>Gen Resource Kind</b></em>' enumerators.
138    * <!-- begin-user-doc -->
139    * <!-- end-user-doc -->
140    * @generated
141    */

142   private static final GenResourceKind[] VALUES_ARRAY =
143     new GenResourceKind[]
144     {
145       NONE_LITERAL,
146       BASIC_LITERAL,
147       XMI_LITERAL,
148       XML_LITERAL,
149     };
150
151   /**
152    * A public read-only list of all the '<em><b>Gen Resource Kind</b></em>' enumerators.
153    * <!-- begin-user-doc -->
154    * <!-- end-user-doc -->
155    * @generated
156    */

157   public static final List JavaDoc VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
158
159   /**
160    * Returns the '<em><b>Gen Resource Kind</b></em>' literal with the specified name.
161    * <!-- begin-user-doc -->
162    * <!-- end-user-doc -->
163    * @generated
164    */

165   public static GenResourceKind get(String JavaDoc name)
166   {
167     for (int i = 0; i < VALUES_ARRAY.length; ++i)
168     {
169       GenResourceKind result = VALUES_ARRAY[i];
170       if (result.toString().equals(name))
171       {
172         return result;
173       }
174     }
175     return null;
176   }
177
178   /**
179    * Returns the '<em><b>Gen Resource Kind</b></em>' literal with the specified value.
180    * <!-- begin-user-doc -->
181    * <!-- end-user-doc -->
182    * @generated
183    */

184   public static GenResourceKind get(int value)
185   {
186     switch (value)
187     {
188       case NONE: return NONE_LITERAL;
189       case BASIC: return BASIC_LITERAL;
190       case XMI: return XMI_LITERAL;
191       case XML: return XML_LITERAL;
192     }
193     return null;
194   }
195
196   /**
197    * Only this class can construct instances.
198    * <!-- begin-user-doc -->
199    * <!-- end-user-doc -->
200    * @generated
201    */

202   private GenResourceKind(int value, String JavaDoc name)
203   {
204     super(value, name);
205   }
206
207 } //GenResourceKind
208
Popular Tags