com.caucho.ejb.gen
Class SingletonGenerator<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.SingletonGenerator<X>

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

Generates the skeleton for a singleton bean.


Field Summary
 
Fields inherited from class com.caucho.ejb.gen.SessionGenerator
_contextClassName
 
Constructor Summary
SingletonGenerator(java.lang.String ejbName, AnnotatedType<X> ejbClass, 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 singleton session bean
protected  void generateClassContent(JavaWriter out)
          Generates the class content.
protected  void generateInjectContent(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, generateContentImpl, 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, generateDestroy, generateDestroyImpl, generateDestroyViews, generateEpilogue, generateFreeInstance, generateInject, 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

SingletonGenerator

public SingletonGenerator(java.lang.String ejbName,
                          AnnotatedType<X> ejbClass,
                          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 singleton 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

generateInjectContent

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