@Module public class NullGenerator<X> extends java.lang.Object implements AspectGenerator<X>
| Modifier and Type | Field and Description |
|---|---|
static NullGenerator<?> |
NULL |
| Modifier and Type | Method and Description |
|---|---|
void |
generate(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> prologueMap)
Top-level generator.
|
void |
generateApplicationException(JavaWriter out,
java.lang.Class<?> exn)
Generates application (checked) exception code for
the method.
|
void |
generateAsync(JavaWriter out) |
void |
generateBeanConstructor(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates bean instance interception
|
void |
generateBeanPrologue(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates the bean instance class prologue
|
void |
generateCall(JavaWriter out)
Generates the method interception code
|
void |
generateDestroy(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates any destroy lifecycle code.
|
void |
generateEpilogue(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates epilogue
|
void |
generateFinally(JavaWriter out)
Generates finally code for the method
|
void |
generateInject(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates bean injection
|
void |
generateMethodPrologue(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates the static class prologue
|
void |
generatePostCall(JavaWriter out)
Generates code after the call, before the return.
|
void |
generatePostConstruct(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates bean post construct interception
|
void |
generatePostFinally(JavaWriter out)
Generates finally code for the method
|
void |
generatePreCall(JavaWriter out)
Generates code before the call, in the try block.
|
void |
generatePreDestroy(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates @PreDestroy code
|
void |
generatePreTry(JavaWriter out)
Generates code before the try block
|
void |
generateProxyConstructor(JavaWriter out,
java.util.HashMap<java.lang.String,java.lang.Object> map)
Generates bean instance interception
|
void |
generateSystemException(JavaWriter out,
java.lang.Class<?> exn)
Generates system (runtime) exception code for
the method.
|
AnnotatedMethod<? super X> |
getMethod()
Returns the underlying method.
|
boolean |
isApplicationExceptionThrown()
True if the application exceptions are thrown
|
public static NullGenerator<?> NULL
public AnnotatedMethod<? super X> getMethod()
AspectGeneratorgetMethod in interface AspectGenerator<X>public void generate(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> prologueMap) throws java.io.IOException
AspectGeneratorgenerate in interface AspectGenerator<X>java.io.IOExceptionpublic void generateBeanPrologue(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
generateBeanPrologue in interface AspectGenerator<X>java.io.IOExceptionpublic void generateBeanConstructor(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
generateBeanConstructor in interface AspectGenerator<X>java.io.IOExceptionpublic void generateProxyConstructor(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
generateProxyConstructor in interface AspectGenerator<X>java.io.IOExceptionpublic void generateInject(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
generateInject in interface AspectGenerator<X>java.io.IOExceptionpublic void generatePostConstruct(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
generatePostConstruct in interface AspectGenerator<X>java.io.IOExceptionpublic void generatePreDestroy(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
AspectGeneratorgeneratePreDestroy in interface AspectGenerator<X>java.io.IOExceptionpublic void generateEpilogue(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
AspectGeneratorgenerateEpilogue in interface AspectGenerator<X>java.io.IOExceptionpublic void generateDestroy(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
AspectGeneratorgenerateDestroy in interface AspectGenerator<X>java.io.IOExceptionpublic void generateMethodPrologue(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map) throws java.io.IOException
generateMethodPrologue in interface AspectGenerator<X>java.io.IOExceptionpublic void generateAsync(JavaWriter out) throws java.io.IOException
generateAsync in interface AspectGenerator<X>java.io.IOExceptionpublic void generatePreTry(JavaWriter out) throws java.io.IOException
retType myMethod(...)
{
[pre-try]
try {
...
}
generatePreTry in interface AspectGenerator<X>java.io.IOExceptionpublic void generatePreCall(JavaWriter out) throws java.io.IOException
retType myMethod(...)
{
try {
[pre-call]
value = bean.myMethod(...);
...
}
generatePreCall in interface AspectGenerator<X>java.io.IOExceptionpublic void generateCall(JavaWriter out) throws java.io.IOException
generateCall in interface AspectGenerator<X>java.io.IOExceptionpublic void generatePostCall(JavaWriter out) throws java.io.IOException
retType myMethod(...)
{
try {
...
value = bean.myMethod(...);
[post-call]
return value;
} finally {
...
}
}
generatePostCall in interface AspectGenerator<X>java.io.IOExceptionpublic boolean isApplicationExceptionThrown()
isApplicationExceptionThrown in interface AspectGenerator<X>public void generateApplicationException(JavaWriter out, java.lang.Class<?> exn) throws java.io.IOException
generateApplicationException in interface AspectGenerator<X>java.io.IOExceptionpublic void generateSystemException(JavaWriter out, java.lang.Class<?> exn) throws java.io.IOException
generateSystemException in interface AspectGenerator<X>java.io.IOExceptionpublic void generateFinally(JavaWriter out) throws java.io.IOException
generateFinally in interface AspectGenerator<X>java.io.IOExceptionpublic void generatePostFinally(JavaWriter out) throws java.io.IOException
generatePostFinally in interface AspectGenerator<X>java.io.IOException