com.caucho.ejb.gen
Class StatefulGenerator<X>

java.lang.Object
  extended by com.caucho.java.gen.ClassComponent
      extended by com.caucho.java.gen.BaseClass
          extended by com.caucho.java.gen.GenClass
              extended by com.caucho.config.gen.BeanGenerator<X>
                  extended by com.caucho.ejb.gen.SessionGenerator<X>
                      extended by com.caucho.ejb.gen.StatefulGenerator<X>

@Module
public class StatefulGenerator<X>
extends SessionGenerator<X>

Generates the skeleton for a stateful bean.


Field Summary
 
Fields inherited from class com.caucho.ejb.gen.SessionGenerator
_contextClassName
 
Constructor Summary
StatefulGenerator(java.lang.String ejbName, AnnotatedType<X> beanType, java.util.ArrayList<AnnotatedType<? super X>> localApi, AnnotatedType<X> localBean, java.util.ArrayList<AnnotatedType<? super X>> remoteApi)
           
 
Method Summary
 void generate(JavaWriter out)
          Generates the stateful session bean
protected  void generateClassContent(JavaWriter out)
          Generates the class content.
protected  void generateContentImpl(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
           
 void generateDestroy(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
          Generates any global destroy
protected  void generateDestroyImpl(JavaWriter out)
           
 void generateValidate(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
           
 void generateXa(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
           
protected  AspectBeanFactory<X> getAspectBeanFactory()
           
 java.lang.String getBeanClassName()
           
 java.lang.String getContextClassName()
           
protected  AspectBeanFactory<X> getLifecycleAspectFactory()
           
 java.lang.String getViewClassName()
           
protected  AnnotatedType<? super X> introspectLocalDefault()
          Scans for the @Local interfaces
 boolean isProxy()
          True if the implementation is a proxy, i.e.
 boolean isStateless()
           
protected  boolean isTimerSupported()
           
 
Methods inherited from class com.caucho.ejb.gen.SessionGenerator
addBusinessMethod, addNonBusinessMethod, addPostConstructMethod, addPreDestroyMethod, addScheduledMethod, generatePostConstruct, getAnnotatedMethods, getLocalApi, getLocalBean, getMethods, getRemoteApi, getScheduledAspectBeanFactory, hasNoInterfaceView, introspect, isBusinessMethod, toFullClassName
 
Methods inherited from class com.caucho.config.gen.BeanGenerator
addDependency, addDependency, generateBeanConstructor, generateBeanConstructor, generateBeanPrologue, generateBusinessMethods, generateClassStaticFields, generateContextObjectConstructor, generateDelegate, generateDependency, generateDestroyViews, generateEpilogue, generateFreeInstance, generateInject, generateInjectContent, generateLifecycleMethod, generateLifecycleMethodReflection, generateLifecycleMethods, generatePostConstructImpl, generateProxyConstructor, generateProxyConstructor, generateTimer, getBeanType, getLifecycleAspects, getLifecycleInstance, getLifecycleMethods, isRemote, toString
 
Methods inherited from class com.caucho.java.gen.GenClass
addImport, generateTopComment, getFullClassName, getPackageName
 
Methods inherited from class com.caucho.java.gen.BaseClass
addComponent, addDependencyComponent, addInterfaceName, addMethod, createMethod, findMethod, generateComponents, getClassName, setClassName, setStatic, setSuperClassName, setVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatefulGenerator

public StatefulGenerator(java.lang.String ejbName,
                         AnnotatedType<X> beanType,
                         java.util.ArrayList<AnnotatedType<? super X>> localApi,
                         AnnotatedType<X> localBean,
                         java.util.ArrayList<AnnotatedType<? super X>> remoteApi)
Method Detail

getAspectBeanFactory

protected AspectBeanFactory<X> getAspectBeanFactory()
Specified by:
getAspectBeanFactory in class SessionGenerator<X>

getLifecycleAspectFactory

protected AspectBeanFactory<X> getLifecycleAspectFactory()
Overrides:
getLifecycleAspectFactory in class SessionGenerator<X>

isStateless

public boolean isStateless()
Overrides:
isStateless in class SessionGenerator<X>

isTimerSupported

protected boolean isTimerSupported()
Specified by:
isTimerSupported in class SessionGenerator<X>

getContextClassName

public java.lang.String getContextClassName()

isProxy

public boolean isProxy()
True if the implementation is a proxy, i.e. an interface stub which calls an instance class.

Overrides:
isProxy in class BeanGenerator<X>

getViewClassName

public java.lang.String getViewClassName()
Overrides:
getViewClassName in class BeanGenerator<X>

getBeanClassName

public java.lang.String getBeanClassName()
Overrides:
getBeanClassName in class BeanGenerator<X>

introspectLocalDefault

protected AnnotatedType<? super X> introspectLocalDefault()
Scans for the @Local interfaces

Overrides:
introspectLocalDefault in class SessionGenerator<X>

generate

public void generate(JavaWriter out)
              throws java.io.IOException
Generates the stateful session bean

Overrides:
generate in class GenClass
Parameters:
out - the writer to the output stream.
Throws:
java.io.IOException

generateClassContent

protected void generateClassContent(JavaWriter out)
                             throws java.io.IOException
Description copied from class: BaseClass
Generates the class content.

Overrides:
generateClassContent in class BaseClass
Throws:
java.io.IOException

generateContentImpl

protected void generateContentImpl(JavaWriter out,
                                   java.util.HashMap<java.lang.String,java.lang.Object> map)
                            throws java.io.IOException
Overrides:
generateContentImpl in class SessionGenerator<X>
Throws:
java.io.IOException

generateValidate

public void generateValidate(JavaWriter out,
                             java.util.HashMap<java.lang.String,java.lang.Object> map)
                      throws java.io.IOException
Throws:
java.io.IOException

generateDestroy

public void generateDestroy(JavaWriter out,
                            java.util.HashMap<java.lang.String,java.lang.Object> map)
                     throws java.io.IOException
Description copied from class: BeanGenerator
Generates any global destroy

Overrides:
generateDestroy in class BeanGenerator<X>
Throws:
java.io.IOException

generateDestroyImpl

protected void generateDestroyImpl(JavaWriter out)
                            throws java.io.IOException
Overrides:
generateDestroyImpl in class BeanGenerator<X>
Throws:
java.io.IOException

generateXa

public void generateXa(JavaWriter out,
                       java.util.HashMap<java.lang.String,java.lang.Object> map)
                throws java.io.IOException
Throws:
java.io.IOException