com.caucho.config.gen
Class LockGenerator<X>

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

@Module
public class LockGenerator<X>
extends AbstractAspectGenerator<X>

Represents EJB lock type specification interception. The specification gears it towards EJB singletons, but it can be used for other bean types.


Constructor Summary
LockGenerator(LockFactory<X> factory, AnnotatedMethod<? super X> method, AspectGenerator<X> next, LockType lockType, long lockTimeout, java.util.concurrent.TimeUnit lockTimeoutUnit)
           
 
Method Summary
 void generateMethodPrologue(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
          Generates the class prologue.
 void generatePostFinally(JavaWriter out)
          Generates the method interception code.
 void generatePreTry(JavaWriter out)
          Generates the method interception code.
 
Methods inherited from class com.caucho.config.gen.AbstractAspectGenerator
generate, generateApplicationException, generateAsync, generateBeanConstructor, generateBeanPrologue, generateCall, generateContent, generateDestroy, generateEpilogue, generateFinally, generateInject, generatePostCall, generatePostConstruct, generatePreCall, generatePreDestroy, generateProxyConstructor, generateSystemException, getAnnotation, getAnnotation, getAnnotation, getBeanFactory, getBeanType, getFactory, getJavaClass, getJavaMethod, getMethod, getThrowsExceptions, getTypeVariables, isApplicationExceptionThrown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LockGenerator

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

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
Generates the method interception code.

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

generatePostFinally

public void generatePostFinally(JavaWriter out)
                         throws java.io.IOException
Generates the method interception code.

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