org.eclipse.emf.codegen.ecore.genmodel.generator
Class GenEnumGeneratorAdapter
java.lang.Object
org.eclipse.emf.common.notify.impl.SingletonAdapterImpl
org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter
org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter
org.eclipse.emf.codegen.ecore.genmodel.generator.GenEnumGeneratorAdapter
- All Implemented Interfaces:
- GeneratorAdapter, Adapter, Adapter.Internal
public class GenEnumGeneratorAdapter
- extends GenBaseGeneratorAdapter
A GeneratorAdapter
for instances of GenEnum
. This contributes the artifacts for every enum to EMF's
default code generation.
This implementation should not be extended merely to augment the default code generation for enums. The
recommended approach is to implement a new adapter and register the adapter factory
that creates it, so that it is contributed to code generation. Such registration is usually done through the
org.eclipse.emf.codegen.ecore.generatorAdapters
extension point.
This implementation may be extended, however, in order to remove from or change the default code generation.
- Since:
- 2.2.0
Fields inherited from class org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter |
adapterFactory, generatingObject, gifEmitters, importManager, jetEmitters, lineDelimiter, MANIFEST_ENCODING, message, OBJECT_ARGUMENT, PROPERTIES_ENCODING, uriConverter |
Methods inherited from class org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter |
addBaseTemplatePathEntries, addClasspathEntries, canGenerate, canGenerateEdit, canGenerateEditor, canGenerateModel, canGenerateTests, clearImportManager, createImportManager, doGenerate, ensureProjectExists, generateEdit, generateEditor, generateTests, getGenerateChildren, getGenerateEditChildren, getGenerateEditorChildren, getGenerateModelChildren, getGenerateTestsChildren, getParent, getUserTemplatePath, setLineDelimiter |
Methods inherited from class org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter |
createCodeFormatter, createGIFEmitter, createInputStream, createJETEmitter, createMonitor, createOutputStream, doPostGenerate, doPreGenerate, ensureContainerExists, exists, formatCode, generate, generateGIF, generateJava, generateProperties, generateText, getAdapterFactory, getCanGenerateChildren, getCanGenerateParent, getContents, getEncoding, getGenerator, getGIFEmitter, getImportManager, getJETEmitter, getLineDelimiter, getLineDelimiter, getURIConverter, isAdapterForType, isReadOnly, postGenerate, preGenerate, setAdapterFactory, setStaticTemplateClass, setWriteable, toDiagnostic, toPlatformResourceURI, toURI, validateEdit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENUM_CLASS_ID
protected static final int ENUM_CLASS_ID
- See Also:
- Constant Field Values
GenEnumGeneratorAdapter
public GenEnumGeneratorAdapter(GeneratorAdapterFactory generatorAdapterFactory)
getJETEmitterDescriptors
protected AbstractGeneratorAdapter.JETEmitterDescriptor[] getJETEmitterDescriptors()
- Returns the set of
JETEmitterDescriptor
s used by the adapter. The contents of the returned array
should never be changed. Rather, subclasses may override this method to return a different array altogether.
getGenerateParent
public java.lang.Object getGenerateParent(java.lang.Object object,
java.lang.Object projectType)
- Returns the
GenPackage
that contains the given GenEnum
.
- Specified by:
getGenerateParent
in interface GeneratorAdapter
- Overrides:
getGenerateParent
in class AbstractGeneratorAdapter
generateModel
protected Diagnostic generateModel(java.lang.Object object,
Monitor monitor)
- Overrides:
generateModel
in class GenBaseGeneratorAdapter
generateEnumClass
protected void generateEnumClass(GenEnum genEnum,
Monitor monitor)