@Module public class CacheGenerator<X> extends AbstractAspectGenerator<X>
Constructor and Description |
---|
CacheGenerator(CacheFactory<X> factory,
AnnotatedMethod<? super X> method,
AspectGenerator<X> next,
CacheResult cacheResult,
CachePut cachePut,
CacheRemoveEntry cacheRemove,
CacheRemoveAll cacheRemoveAll) |
Modifier and Type | Method and Description |
---|---|
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.
|
generate, generateApplicationException, generateAsync, generateBeanConstructor, generateBeanPrologue, generateCall, generateContent, generateDestroy, generateEpilogue, generateFinally, generateInject, generatePostConstruct, generatePostFinally, generatePreDestroy, generatePreTry, generateProxyConstructor, generateSystemException, getAnnotation, getAnnotation, getAnnotation, getBeanFactory, getBeanType, getFactory, getInstanceName, getJavaClass, getJavaMethod, getMethod, getThrowsExceptions, getTypeVariables, isApplicationExceptionThrown, toString
public CacheGenerator(CacheFactory<X> factory, AnnotatedMethod<? super X> method, AspectGenerator<X> next, CacheResult cacheResult, CachePut cachePut, CacheRemoveEntry cacheRemove, CacheRemoveAll cacheRemoveAll)
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 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