@Module public class XaGenerator<X> extends AbstractAspectGenerator<X>
Constructor and Description |
---|
XaGenerator(XaFactory<X> factory,
AnnotatedMethod<? super X> method,
AspectGenerator<X> next,
TransactionAttributeType xa,
boolean isBeanManaged) |
Modifier and Type | Method and Description |
---|---|
void |
generateApplicationException(JavaWriter out,
java.lang.Class<?> exception)
Generates aspect code for an application exception
|
void |
generateFinally(JavaWriter out)
Generates the aspect 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 the interceptor code after invocation and before the call.
|
void |
generatePreCall(JavaWriter out)
Generates the interceptor code after the try-block and before the call.
|
void |
generatePreTry(JavaWriter out)
Generates code before the "try" block
|
void |
generateSystemException(JavaWriter out,
java.lang.Class<?> exn)
Generates system (runtime) exception code for
the method.
|
TransactionAttributeType |
getTransactionType()
Returns the transaction type
|
generate, generateAsync, generateBeanConstructor, generateBeanPrologue, generateCall, generateContent, generateDestroy, generateEpilogue, generateInject, generatePostConstruct, generatePostFinally, generatePreDestroy, generateProxyConstructor, getAnnotation, getAnnotation, getAnnotation, getBeanFactory, getBeanType, getFactory, getInstanceName, getJavaClass, getJavaMethod, getMethod, getThrowsExceptions, getTypeVariables, isApplicationExceptionThrown, toString
public XaGenerator(XaFactory<X> factory, AnnotatedMethod<? super X> method, AspectGenerator<X> next, TransactionAttributeType xa, boolean isBeanManaged)
public TransactionAttributeType getTransactionType()
public void generateMethodPrologue(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
generateMethodPrologue
in interface AspectGenerator<X>
generateMethodPrologue
in class AbstractAspectGenerator<X>
java.io.IOException
public void generatePreTry(JavaWriter out) throws java.io.IOException
retType myMethod(...)
{
[pre-try]
try {
...
}
generatePreTry
in interface AspectGenerator<X>
generatePreTry
in class AbstractAspectGenerator<X>
java.io.IOException
public void generatePreCall(JavaWriter out) throws java.io.IOException
retType myMethod(...)
{
try {
[pre-call]
retValue = super.myMethod(...);
}
generatePreCall
in interface AspectGenerator<X>
generatePreCall
in class AbstractAspectGenerator<X>
java.io.IOException
public void generatePostCall(JavaWriter out) throws java.io.IOException
retType myMethod(...)
{
try {
retValue = super.myMethod(...);
[post-call]
return retValue;
} finally {
...
}
}
generatePostCall
in interface AspectGenerator<X>
generatePostCall
in class AbstractAspectGenerator<X>
java.io.IOException
public void generateApplicationException(JavaWriter out, java.lang.Class<?> exception) throws java.io.IOException
generateApplicationException
in interface AspectGenerator<X>
generateApplicationException
in class AbstractAspectGenerator<X>
java.io.IOException
public void generateSystemException(JavaWriter out, java.lang.Class<?> exn) throws java.io.IOException
AbstractAspectGenerator
generateSystemException
in interface AspectGenerator<X>
generateSystemException
in class AbstractAspectGenerator<X>
java.io.IOException
public void generateFinally(JavaWriter out) throws java.io.IOException
retType myMethod(...)
{
try {
...
} finally {
[finally]
}
}
generateFinally
in interface AspectGenerator<X>
generateFinally
in class AbstractAspectGenerator<X>
java.io.IOException