|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GeneratorAdapterFactory
A factory for adapters that perform code generation for a Generator
.
A single GeneratorAdapterFactory
is associated with an EMF or Java package, and can return an adapter
that implements GeneratorAdapter
for instances of any or all of the classes within that package. Multiple
factories can be associated can be associated with a single package, with all of their adapters contributing
functionality to code generation for an object.
A type of GeneratorAdapterFactory
is registered, via a descriptor
, against a
package ID in a registry
, in order to create adapters for that package. Typically, this
is done via the org.eclipse.emf.codegen.ecore.generatorAdapters
extension point, using an
adapterFactory
element.
A GeneratorAdapterFactory
is a factory for type GeneratorAdapter.class
; that is, its
isFactoryForType(Object)
method should
return true
for this type. However, because EMF's adapter framework supports only one adapter of a given
type on any object and because each of many generator adapter factories needs to be able to have a generator on a
single object, GeneratorAdapter.class
cannot be used as the type of the adapters. Instead, each
generator adapter factory should use itself as the type of its adapters.
This interface is typically implemented by extending either AbstractGeneratorAdapterFactory
or the
generated adapter factory for a package. The latter approach provides efficient, package-specific type switching for
createAdapter(Notifier)
, while the former provides simple implementations for several other required
methods.
There is also a generic implementation provided by the framework that can create a single adapter for just one
type of object. This implementation is used under the covers for adapters registered via the above extension point
with an adapter
element.
Nested Class Summary | |
---|---|
static interface |
GeneratorAdapterFactory.Descriptor
In essence, a factory for generator adapter factories. |
Method Summary | |
---|---|
void |
dispose()
Disposes this adapter factory and all of the adapters it has created. |
Generator |
getGenerator()
Returns the Generator associated with this adapter factory. |
void |
initialize(java.lang.Object input)
Performs initialization for the given model-level input object. |
void |
setGenerator(Generator generator)
Sets the Generator associated with this adapter factory. |
Methods inherited from interface org.eclipse.emf.common.notify.AdapterFactory |
---|
adapt, adapt, adaptAllNew, adaptNew, isFactoryForType |
Method Detail |
---|
Generator getGenerator()
Generator
associated with this adapter factory.
setGenerator(Generator)
void setGenerator(Generator generator)
Generator
associated with this adapter factory.
getGenerator()
void initialize(java.lang.Object input)
options
on the associated Generator
.
void dispose()
|
Copyright 2001-2012 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |