KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2005 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: GenClass.java,v 1.15 2005/06/15 20:09:00 khussey Exp $
16  */

17 package org.eclipse.emf.codegen.ecore.genmodel;
18
19
20 import java.util.List JavaDoc;
21
22 import org.eclipse.emf.common.util.EList;
23 import org.eclipse.emf.ecore.EClass;
24
25
26 /**
27  * <!-- begin-user-doc -->
28  * A representation of the model object '<em><b>Gen Class</b></em>'.
29  * <!-- end-user-doc -->
30  *
31  * <p>
32  * The following features are supported:
33  * <ul>
34  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#getProvider <em>Provider</em>}</li>
35  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#isImage <em>Image</em>}</li>
36  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#getEcoreClass <em>Ecore Class</em>}</li>
37  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#getGenFeatures <em>Gen Features</em>}</li>
38  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#getGenOperations <em>Gen Operations</em>}</li>
39  * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#getLabelFeature <em>Label Feature</em>}</li>
40  * </ul>
41  * </p>
42  *
43  * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenClass()
44  * @model
45  * @generated
46  */

47 public interface GenClass extends GenClassifier
48 {
49   /**
50    * Returns the value of the '<em><b>Provider</b></em>' attribute.
51    * The literals are from the enumeration {@link org.eclipse.emf.codegen.ecore.genmodel.GenProviderKind}.
52    * <!-- begin-user-doc -->
53    * <p>
54    * If the meaning of the '<em>Provider</em>' attribute isn't clear,
55    * there really should be more of a description here...
56    * </p>
57    * <!-- end-user-doc -->
58    * @return the value of the '<em>Provider</em>' attribute.
59    * @see org.eclipse.emf.codegen.ecore.genmodel.GenProviderKind
60    * @see #setProvider(GenProviderKind)
61    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenClass_Provider()
62    * @model
63    * @generated
64    */

65   GenProviderKind getProvider();
66
67   /**
68    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#getProvider <em>Provider</em>}' attribute.
69    * <!-- begin-user-doc -->
70    * <!-- end-user-doc -->
71    * @param value the new value of the '<em>Provider</em>' attribute.
72    * @see org.eclipse.emf.codegen.ecore.genmodel.GenProviderKind
73    * @see #getProvider()
74    * @generated
75    */

76   void setProvider(GenProviderKind value);
77
78   /**
79    * Returns the value of the '<em><b>Image</b></em>' attribute.
80    * The default value is <code>"true"</code>.
81    * <!-- begin-user-doc -->
82    * <p>
83    * If the meaning of the '<em>Image</em>' attribute isn't clear,
84    * there really should be more of a description here...
85    * </p>
86    * <!-- end-user-doc -->
87    * @return the value of the '<em>Image</em>' attribute.
88    * @see #setImage(boolean)
89    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenClass_Image()
90    * @model default="true"
91    * @generated
92    */

93   boolean isImage();
94
95   /**
96    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#isImage <em>Image</em>}' attribute.
97    * <!-- begin-user-doc -->
98    * <!-- end-user-doc -->
99    * @param value the new value of the '<em>Image</em>' attribute.
100    * @see #isImage()
101    * @generated
102    */

103   void setImage(boolean value);
104
105   /**
106    * Returns the value of the '<em><b>Ecore Class</b></em>' reference.
107    * <!-- begin-user-doc -->
108    * <p>
109    * If the meaning of the '<em>Ecore Class</em>' reference isn't clear,
110    * there really should be more of a description here...
111    * </p>
112    * <!-- end-user-doc -->
113    * @return the value of the '<em>Ecore Class</em>' reference.
114    * @see #setEcoreClass(EClass)
115    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenClass_EcoreClass()
116    * @model required="true"
117    * @generated
118    */

119   EClass getEcoreClass();
120
121   /**
122    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#getEcoreClass <em>Ecore Class</em>}' reference.
123    * <!-- begin-user-doc -->
124    * <!-- end-user-doc -->
125    * @param value the new value of the '<em>Ecore Class</em>' reference.
126    * @see #getEcoreClass()
127    * @generated
128    */

129   void setEcoreClass(EClass value);
130
131   /**
132    * Returns the value of the '<em><b>Gen Features</b></em>' containment reference list.
133    * The list contents are of type {@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature}.
134    * It is bidirectional and its opposite is '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getGenClass <em>Gen Class</em>}'.
135    * <!-- begin-user-doc -->
136    * <p>
137    * If the meaning of the '<em>Gen Features</em>' reference list isn't clear,
138    * there really should be more of a description here...
139    * </p>
140    * <!-- end-user-doc -->
141    * @return the value of the '<em>Gen Features</em>' containment reference list.
142    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenClass_GenFeatures()
143    * @see org.eclipse.emf.codegen.ecore.genmodel.GenFeature#getGenClass
144    * @model type="org.eclipse.emf.codegen.ecore.genmodel.GenFeature" opposite="genClass" containment="true"
145    * @generated
146    */

147   EList getGenFeatures();
148
149   /**
150    * Returns the value of the '<em><b>Gen Operations</b></em>' containment reference list.
151    * The list contents are of type {@link org.eclipse.emf.codegen.ecore.genmodel.GenOperation}.
152    * It is bidirectional and its opposite is '{@link org.eclipse.emf.codegen.ecore.genmodel.GenOperation#getGenClass <em>Gen Class</em>}'.
153    * <!-- begin-user-doc -->
154    * <p>
155    * If the meaning of the '<em>Gen Operations</em>' reference list isn't clear,
156    * there really should be more of a description here...
157    * </p>
158    * <!-- end-user-doc -->
159    * @return the value of the '<em>Gen Operations</em>' containment reference list.
160    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenClass_GenOperations()
161    * @see org.eclipse.emf.codegen.ecore.genmodel.GenOperation#getGenClass
162    * @model type="org.eclipse.emf.codegen.ecore.genmodel.GenOperation" opposite="genClass" containment="true"
163    * @generated
164    */

165   EList getGenOperations();
166
167   /**
168    * Returns the value of the '<em><b>Label Feature</b></em>' reference.
169    * <!-- begin-user-doc -->
170    * <p>
171    * If the meaning of the '<em>Label Feature</em>' reference isn't clear,
172    * there really should be more of a description here...
173    * </p>
174    * <!-- end-user-doc -->
175    * @return the value of the '<em>Label Feature</em>' reference.
176    * @see #setLabelFeature(GenFeature)
177    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenClass_LabelFeature()
178    * @model
179    * @generated
180    */

181   GenFeature getLabelFeature();
182
183   /**
184    * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass#getLabelFeature <em>Label Feature</em>}' reference.
185    * <!-- begin-user-doc -->
186    * <!-- end-user-doc -->
187    * @param value the new value of the '<em>Label Feature</em>' reference.
188    * @see #getLabelFeature()
189    * @generated
190    */

191   void setLabelFeature(GenFeature value);
192
193   /**
194    * This should only be called when there is actually an interface being
195    * generated (i.e. when, for certain, this is not an external interface).
196    * Otherwise, getImportedInterfaceName() should be used.
197    */

198   String JavaDoc getInterfaceName();
199
200   String JavaDoc getQualifiedInterfaceName();
201   String JavaDoc getImportedInterfaceName();
202
203   String JavaDoc getClassName();
204   String JavaDoc getQualifiedClassName();
205   String JavaDoc getImportedClassName();
206
207   /**
208    * This returns the name uncapitalized. Callers that plan to use this name
209    * without appending a suffix should call getSafeUncapInterfaceName() to
210    * make sure it's not a reserved word.
211    */

212   String JavaDoc getUncapName();
213
214   List JavaDoc/*of GenClass*/ getBaseGenClasses();
215   List JavaDoc/*of GenClass*/ getAllBaseGenClasses();
216
217   /**
218    * Like getAllBaseGenClasses(), this returns the GenClasses for all of the
219    * supertypes, but the result is ordered by a breadth-first search, making
220    * it appropriate for use in the switch class.
221    */

222   List JavaDoc/*of GenClass*/ getSwitchGenClasses();
223
224   /**
225    * This returns the GenClass for the first immediate supertype.
226    */

227   GenClass getBaseGenClass();
228
229   /**
230    * This walks up the chain of GenClasses defined by getBaseGenClass() and
231    * returns the first that does not represent an abstract class or an
232    * interface; that is, the instantiable class that the implementation
233    * class should extended.
234    */

235   GenClass getClassExtendsGenClass();
236
237   String JavaDoc getClassExtends();
238   String JavaDoc getClassImplements();
239   String JavaDoc getInterfaceExtends();
240   boolean needsRootExtendsInterfaceExtendsTag();
241
242   List JavaDoc/*of GenFeature*/ getAllGenFeatures();
243   List JavaDoc/*of GenFeature*/ getInheritedGenFeatures();
244   List JavaDoc/*of GenOperation*/ getAllGenOperations();
245
246   String JavaDoc getFeatureID(GenFeature genFeature);
247   String JavaDoc getQualifiedFeatureID(GenFeature genFeature);
248   String JavaDoc getOperationID(GenOperation genOperation);
249   String JavaDoc getFeatureValue(GenFeature genFeature);
250   String JavaDoc getLocalFeatureIndex(GenFeature genFeature);
251   String JavaDoc getFlagsField(GenFeature genFeature);
252   int getFlagIndex(GenFeature genFeature);
253   String JavaDoc getESetFlagsField(GenFeature genFeature);
254   int getESetFlagIndex(GenFeature genFeature);
255
256   String JavaDoc getFeatureCountID();
257   String JavaDoc getQualifiedFeatureCountID();
258   String JavaDoc getFeatureCountValue();
259   int getFeatureCount();
260
261   boolean isEObject();
262   boolean isEObjectExtension();
263   boolean isAbstract();
264   String JavaDoc getAbstractFlag();
265   boolean isInterface();
266   String JavaDoc getInterfaceFlag();
267
268   /**
269    * This indicates that there is already an existing interface for this
270    * class or interface, so none will be generated. Any other generated
271    * that wishes to refer to its interface should use the value from
272    * getQualifiedInterfaceName() or getImportedInterfaceName().
273    */

274   boolean isExternalInterface();
275
276   boolean isMapEntry();
277   GenFeature getMapEntryKeyFeature();
278   GenFeature getMapEntryValueFeature();
279
280   List JavaDoc/*of GenClass*/ getImplementedGenClasses();
281   List JavaDoc/*of GenFeature*/ getImplementedGenFeatures();
282   List JavaDoc/*of GenOperation*/ getImplementedGenOperations();
283
284   List JavaDoc/*of GenClass*/ getExtendedGenClasses();
285   List JavaDoc/*of GenFeature*/ getExtendedGenFeatures();
286   List JavaDoc/*of GenOperation*/ getExtendedGenOperations();
287
288   List JavaDoc/*of GenFeature*/ getDeclaredFieldGenFeatures();
289
290   List JavaDoc/*of GenFeature*/ getDeclaredGenFeatures();
291   List JavaDoc/*of GenOperation*/ getDeclaredGenOperations();
292
293   List JavaDoc/*of GenFeature*/ getFlagGenFeatures();
294   List JavaDoc/*of GenFeature*/ getFlagGenFeatures(String JavaDoc staticDefaultValue);
295
296   List JavaDoc/*of GenFeature*/ getESetGenFeatures();
297   List JavaDoc/*of GenFeature*/ getEInverseAddGenFeatures();
298   List JavaDoc/*of GenFeature*/ getEInverseRemoveGenFeatures();
299   List JavaDoc/*of GenFeature*/ getEBasicRemoveFromContainerGenFeatures();
300   List JavaDoc/*of GenFeature*/ getToStringGenFeatures();
301
302   List JavaDoc/*of GenClass*/ getMixinGenClasses();
303   List JavaDoc/*of GenFeature*/ getMixinGenFeatures();
304   List JavaDoc/*of GenOperation*/ getMixinGenOperations();
305
306   void initialize(EClass eClass);
307   //
308
// EMFEdit generation
309
//
310

311   String JavaDoc getProviderClassName();
312   String JavaDoc getQualifiedProviderClassName();
313   String JavaDoc getImportedProviderClassName();
314   boolean isProviderSingleton();
315
316   String JavaDoc getProviderBaseClassName();
317   List JavaDoc/*of GenClass*/ getProviderImplementedGenClasses();
318
319   List JavaDoc/*of GenFeature*/ getLabelFeatureCandidates();
320   List JavaDoc/*of GenFeature*/ getPropertyFeatures();
321
322   List JavaDoc/*of GenFeature*/ getNotifyFeatures();
323   List JavaDoc/*of GenFeature*/ getLabelNotifyFeatures();
324   List JavaDoc/*of GenFeature*/ getContentNotifyFeatures();
325   List JavaDoc/*of GenFeature*/ getLabelAndContentNotifyFeatures();
326
327   List JavaDoc/*of GenFeature*/ getChildrenFeatures();
328   List JavaDoc/*of GenFeature*/ getAllChildrenFeatures();
329
330   List JavaDoc/*of GenFeature*/ getCreateChildFeatures();
331   List JavaDoc/*of GenFeature*/ getAllCreateChildFeatures();
332   List JavaDoc/*of GenFeature*/ getCrossPackageCreateChildFeatures();
333   List JavaDoc/*of GenFeature*/ getSharedClassCreateChildFeatures();
334   boolean hasFeatureMapCreateChildFeatures();
335
336   List JavaDoc/*of GenClass*/ getChildrenClasses(GenFeature genFeature);
337   List JavaDoc/*of GenClass*/ getCrossPackageChildrenClasses(GenFeature genFeature);
338
339   String JavaDoc getItemProviderAdapterFactoryClassName();
340
341   String JavaDoc getTestCaseClassName();
342   String JavaDoc getQualifiedTestCaseClassName();
343   String JavaDoc getImportedTestCaseClassName();
344   
345   String JavaDoc getModelInfo();
346
347   boolean reconcile(GenClass oldGenClassVersion);
348
349   GenOperation getInvariantOperation(String JavaDoc constraint);
350
351   boolean isDocumentRoot();
352   GenFeature getMixedGenFeature();
353   
354   String JavaDoc getListConstructor(GenFeature genFeature);
355
356   boolean isModelRoot();
357
358   boolean isFlag(GenFeature genFeature);
359   boolean isESetFlag(GenFeature genFeature);
360
361   boolean isField(GenFeature genFeature);
362   boolean isESetField(GenFeature genFeature);
363
364   boolean hasTests();
365 }
366
Popular Tags