|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bm.datagen.utils.GeneratorDependencyInjector
public class GeneratorDependencyInjector
This class is used to enable dependency injections in generators e.g. a Generator can obtain a reference to a used property -> all references are set before the call of the next value method
Constructor Summary | |
---|---|
GeneratorDependencyInjector()
|
Method Summary | |
---|---|
void |
callCleanup(Generator<?> toInvoke)
Invokes all annotated clean up methods. |
void |
callPrepare(Generator<?> toInvoke)
Invokes all annotated Prepare methods at the current generator. |
void |
inject(Generator<?> toInject)
This class injects the preset values if the registered annotations are present. |
void |
setEntityManager(javax.persistence.EntityManager em)
The entity manager to inject. |
void |
setInstance(java.lang.Object instance)
The current object to inject. |
void |
setIntrospector(Introspector<?> introspector)
The current introspector. |
void |
setProperty(Property property)
The property to inject. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeneratorDependencyInjector()
Method Detail |
---|
public void inject(Generator<?> toInject)
toInject
- -
the Generator where the values should be injectedpublic void callPrepare(Generator<?> toInvoke)
toInvoke
- -
the generator wich method gets invokedpublic void callCleanup(Generator<?> toInvoke)
toInvoke
- -
the cleanup method of the generator.public void setInstance(java.lang.Object instance)
instance
- The instance to set.public void setIntrospector(Introspector<?> introspector)
introspector
- The introspector to set.public void setEntityManager(javax.persistence.EntityManager em)
em
- The entity manager to inject.public void setProperty(Property property)
property
- The property to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |