com.caucho.ejb.gen
Class StatelessMethodHeadGenerator<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.StatelessMethodHeadGenerator<X>
All Implemented Interfaces:
AspectGenerator<X>

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

Represents a stateless local business method


Constructor Summary
StatelessMethodHeadGenerator(StatelessMethodHeadFactory<X> factory, AnnotatedMethod<? super X> method, AspectGenerator<X> next)
           
 
Method Summary
 void generateApplicationException(JavaWriter out, java.lang.Class<?> exn)
          Generates code for an application (checked) exception.
 void generateFinally(JavaWriter out)
          Generates the code in the finally block
 void generateMethodPrologue(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
          Generates the static class prologue
 void generatePostCall(JavaWriter out)
          Generates aspect code after the invocation.
 void generatePreCall(JavaWriter out)
          Generates code in the "try" block before the call
 void generatePreTry(JavaWriter out)
          Generates code before the "try" block
protected  boolean isOverride()
           
 
Methods inherited from class com.caucho.config.gen.MethodHeadGenerator
equals, generate, getMethodName, getMethodNamePrefix, hashCode
 
Methods inherited from class com.caucho.config.gen.AbstractAspectGenerator
generateAsync, generateBeanConstructor, generateBeanPrologue, generateCall, 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

StatelessMethodHeadGenerator

public StatelessMethodHeadGenerator(StatelessMethodHeadFactory<X> factory,
                                    AnnotatedMethod<? super X> method,
                                    AspectGenerator<X> next)
Method Detail

isOverride

protected boolean isOverride()
Overrides:
isOverride in class MethodHeadGenerator<X>

generateMethodPrologue

public void generateMethodPrologue(JavaWriter out,
                                   java.util.HashMap<java.lang.String,java.lang.Object> map)
                            throws java.io.IOException
Generates the static 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
Generates code before the "try" block
 retType myMethod(...)
 {
   [pre-try]
   try {
     ...
 }
 

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
Generates code in the "try" block before the call
 retType myMethod(...)
 {
   ...
   try {
     [pre-call]
     ret = super.myMethod(...)
     ...
 }
 

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

generatePostCall

public void generatePostCall(JavaWriter out)
                      throws java.io.IOException
Generates aspect code after the invocation.
 retType myMethod(...)
 {
   ...
   try {
     ...
     ret = super.myMethod(...)
     [post-call]
     return ret;
   } finally {
     ...
   }
 }
 

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 code for an application (checked) exception.

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
Generates the code in the finally block
 myRet myMethod(...)
 {
   try {
     ...
   } finally {
     [finally]
   }
 

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