@Module public abstract class BeanGenerator<X> extends GenClass
Modifier | Constructor and Description |
---|---|
protected |
BeanGenerator(java.lang.String fullClassName,
AnnotatedType<X> beanType) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDependency(java.lang.Class<?> cl) |
protected void |
addDependency(PersistentDependency depend) |
void |
generateBeanConstructor(JavaWriter out)
Generates constructor additions
|
void |
generateBeanConstructor(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates constructor additions
|
void |
generateBeanPrologue(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates prologue additions
|
void |
generateBusinessMethods(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates view's business methods
|
void |
generateClassStaticFields(JavaWriter out) |
void |
generateContextObjectConstructor(JavaWriter out)
Generates context object's constructor
|
protected void |
generateDelegate(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map) |
protected void |
generateDependency(JavaWriter out) |
void |
generateDestroy(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates any global destroy
|
protected void |
generateDestroyImpl(JavaWriter out) |
void |
generateDestroyViews(JavaWriter out)
Generates the view contents
|
protected void |
generateEpilogue(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map) |
void |
generateFreeInstance(JavaWriter out,
java.lang.String name)
Frees a bean instance.
|
protected void |
generateInject(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map) |
protected void |
generateInjectContent(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map) |
protected void |
generateLifecycleMethod(JavaWriter out,
int i,
java.lang.reflect.Method method,
java.lang.String lifecycleType) |
protected void |
generateLifecycleMethodReflection(JavaWriter out,
java.util.ArrayList<java.lang.reflect.Method> methods,
java.lang.String lifecycleType) |
protected void |
generateLifecycleMethods(JavaWriter out,
java.util.ArrayList<java.lang.reflect.Method> methods,
java.lang.String lifecycleType) |
protected void |
generatePostConstruct(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map) |
protected void |
generatePostConstructImpl(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map) |
void |
generateProxyConstructor(JavaWriter out)
Generates constructor additions
|
void |
generateProxyConstructor(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates constructor additions
|
void |
generateTimer(JavaWriter out)
Generates timer code
|
protected abstract AspectBeanFactory<X> |
getAspectBeanFactory() |
java.lang.String |
getBeanClassName() |
AnnotatedType<X> |
getBeanType() |
protected AspectBeanFactory<X> |
getLifecycleAspectFactory() |
protected java.util.ArrayList<java.lang.reflect.Method> |
getLifecycleAspects(java.lang.Class<? extends java.lang.annotation.Annotation> annType) |
protected java.lang.String |
getLifecycleInstance() |
protected java.util.ArrayList<java.lang.reflect.Method> |
getLifecycleMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annType) |
java.util.ArrayList<AspectGenerator<X>> |
getMethods()
Returns the introspected methods
|
java.lang.String |
getViewClassName() |
void |
introspect() |
boolean |
isProxy() |
boolean |
isRemote() |
java.lang.String |
toString() |
addImport, generate, generateTopComment, getFullClassName, getPackageName
addComponent, addDependencyComponent, addInterfaceName, addMethod, createMethod, findMethod, generateClassContent, generateComponents, getClassName, setClassName, setStatic, setSuperClassName, setVisibility
protected BeanGenerator(java.lang.String fullClassName, AnnotatedType<X> beanType)
public AnnotatedType<X> getBeanType()
protected void addDependency(PersistentDependency depend)
protected void addDependency(java.lang.Class<?> cl)
public java.lang.String getBeanClassName()
public java.lang.String getViewClassName()
public boolean isRemote()
public boolean isProxy()
public java.util.ArrayList<AspectGenerator<X>> getMethods()
protected abstract AspectBeanFactory<X> getAspectBeanFactory()
protected AspectBeanFactory<X> getLifecycleAspectFactory()
public void introspect()
public void generateClassStaticFields(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateDestroyViews(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateContextObjectConstructor(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateTimer(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateFreeInstance(JavaWriter out, java.lang.String name) throws java.io.IOException
java.io.IOException
public void generateDestroy(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
protected void generateDestroyImpl(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateProxyConstructor(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateProxyConstructor(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
public void generateBeanConstructor(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateBeanConstructor(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
public void generateBeanPrologue(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
protected void generateInject(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
protected void generateInjectContent(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
protected void generateDelegate(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
protected void generatePostConstruct(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
protected void generatePostConstructImpl(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
protected void generateLifecycleMethodReflection(JavaWriter out, java.util.ArrayList<java.lang.reflect.Method> methods, java.lang.String lifecycleType) throws java.io.IOException
java.io.IOException
protected void generateLifecycleMethods(JavaWriter out, java.util.ArrayList<java.lang.reflect.Method> methods, java.lang.String lifecycleType) throws java.io.IOException
java.io.IOException
protected void generateLifecycleMethod(JavaWriter out, int i, java.lang.reflect.Method method, java.lang.String lifecycleType) throws java.io.IOException
java.io.IOException
protected java.lang.String getLifecycleInstance()
protected java.util.ArrayList<java.lang.reflect.Method> getLifecycleMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annType)
protected java.util.ArrayList<java.lang.reflect.Method> getLifecycleAspects(java.lang.Class<? extends java.lang.annotation.Annotation> annType)
protected void generateEpilogue(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
public void generateBusinessMethods(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
protected void generateDependency(JavaWriter out) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object