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

java.lang.Object
  extended by com.caucho.config.gen.AbstractAspectGenerator<X>
      extended by com.caucho.config.gen.MethodHeadGenerator<X>
          extended by com.caucho.ejb.gen.StatefulMethodHeadGenerator<X>
All Implemented Interfaces:
AspectGenerator<X>

@Module
public class StatefulMethodHeadGenerator<X>
extends MethodHeadGenerator<X>

Represents a stateful local business method


Constructor Summary
StatefulMethodHeadGenerator(StatefulMethodHeadFactory<X> factory, AnnotatedMethod<? super X> method, AspectGenerator<X> next)
           
StatefulMethodHeadGenerator(StatefulMethodHeadFactory<X> factory, AnnotatedMethod<? super X> method, AspectGenerator<X> next, long lockTimeout, java.util.concurrent.TimeUnit lockTimeoutUnit)
           
 
Method Summary
 void generateApplicationException(JavaWriter out, java.lang.Class<?> exn)
          Generates the underlying bean instance
 void generateCall(JavaWriter out)
          Generates the method interception code
 void generateFinally(JavaWriter out)
          Generates finally code for the method
 void generateMethodPrologue(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
          Generates the class prologue.
 void generatePostCall(JavaWriter out)
          Generates the underlying bean instance
 void generatePreCall(JavaWriter out)
          Generates code before the call, in the try block.
 void generatePreTry(JavaWriter out)
          Generates code before the try block
protected  TransactionAttributeType getDefaultTransactionType()
           
 
Methods inherited from class com.caucho.config.gen.MethodHeadGenerator
equals, generate, getMethodName, getMethodNamePrefix, hashCode, isOverride
 
Methods inherited from class com.caucho.config.gen.AbstractAspectGenerator
generateAsync, generateBeanConstructor, generateBeanPrologue, generateContent, generateDestroy, generateEpilogue, generateInject, generatePostConstruct, generatePostFinally, generatePreDestroy, generateProxyConstructor, generateSystemException, getAnnotation, getAnnotation, getAnnotation, getBeanFactory, getBeanType, getFactory, getJavaClass, getJavaMethod, getMethod, getThrowsExceptions, getTypeVariables, isApplicationExceptionThrown, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatefulMethodHeadGenerator

public StatefulMethodHeadGenerator(StatefulMethodHeadFactory<X> factory,
                                   AnnotatedMethod<? super X> method,
                                   AspectGenerator<X> next)

StatefulMethodHeadGenerator

public StatefulMethodHeadGenerator(StatefulMethodHeadFactory<X> factory,
                                   AnnotatedMethod<? super X> method,
                                   AspectGenerator<X> next,
                                   long lockTimeout,
                                   java.util.concurrent.TimeUnit lockTimeoutUnit)
Method Detail

getDefaultTransactionType

protected TransactionAttributeType getDefaultTransactionType()

generateMethodPrologue

public void generateMethodPrologue(JavaWriter out,
                                   java.util.HashMap<java.lang.String,java.lang.Object> map)
                            throws java.io.IOException
Generates the class prologue.

Specified by:
generateMethodPrologue in interface AspectGenerator<X>
Overrides:
generateMethodPrologue in class AbstractAspectGenerator<X>
Throws:
java.io.IOException

generatePreTry

public void generatePreTry(JavaWriter out)
                    throws java.io.IOException
Description copied from class: AbstractAspectGenerator
Generates code before the try block

Specified by:
generatePreTry in interface AspectGenerator<X>
Overrides:
generatePreTry in class AbstractAspectGenerator<X>
Throws:
java.io.IOException

generatePreCall

public void generatePreCall(JavaWriter out)
                     throws java.io.IOException
Description copied from class: AbstractAspectGenerator
Generates code before the call, in the try block.
 retType myMethod(...)
 {
   try {
     [pre-call]
     value = bean.myMethod(...);
     ...
 }
 

Specified by:
generatePreCall in interface AspectGenerator<X>
Overrides:
generatePreCall in class AbstractAspectGenerator<X>
Throws:
java.io.IOException

generateCall

public void generateCall(JavaWriter out)
                  throws java.io.IOException
Description copied from class: AbstractAspectGenerator
Generates the method interception code

Specified by:
generateCall in interface AspectGenerator<X>
Overrides:
generateCall in class AbstractAspectGenerator<X>
Throws:
java.io.IOException

generatePostCall

public void generatePostCall(JavaWriter out)
                      throws java.io.IOException
Generates the underlying bean instance

Specified by:
generatePostCall in interface AspectGenerator<X>
Overrides:
generatePostCall in class AbstractAspectGenerator<X>
Throws:
java.io.IOException

generateApplicationException

public void generateApplicationException(JavaWriter out,
                                         java.lang.Class<?> exn)
                                  throws java.io.IOException
Generates the underlying bean instance

Specified by:
generateApplicationException in interface AspectGenerator<X>
Overrides:
generateApplicationException in class AbstractAspectGenerator<X>
Throws:
java.io.IOException

generateFinally

public void generateFinally(JavaWriter out)
                     throws java.io.IOException
Description copied from class: AbstractAspectGenerator
Generates finally code for the method

Specified by:
generateFinally in interface AspectGenerator<X>
Overrides:
generateFinally in class AbstractAspectGenerator<X>
Throws:
java.io.IOException