|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.internal.plastic.AbstractMethodInvocation
public abstract class AbstractMethodInvocation
Constructor Summary | |
---|---|
protected |
AbstractMethodInvocation(Object instance,
InstanceContext instanceContext,
MethodInvocationBundle bundle)
|
Method Summary | ||
---|---|---|
protected void |
clearCheckedException()
Invoked from the implementation of MethodInvocation.setReturnValue(Object) . |
|
boolean |
didThrowCheckedException()
Returns true if the method invocation threw a checked exception. |
|
|
getAnnotation(Class<T> annotationType)
Returns an instantiated annotation, or null if the target does not have the indicated annotation. |
|
|
getCheckedException(Class<T> exceptionType)
Retrieves the checked exception assignable to the indicated type, or null if the invocation did not throw a checked exception or the thrown exception is not assignable. |
|
Object |
getInstance()
The instance on which the method was originally invoked. |
|
InstanceContext |
getInstanceContext()
|
|
Method |
getMethod()
Returns the method being invoked. |
|
|
hasAnnotation(Class<T> annotationType)
Checks to see if the target has an annotation of the given type. |
|
MethodInvocation |
proceed()
Proceed with the method invocation, either chaining into the next MethodAdvice added to the method, or
ultimately into the actual method implementation. |
|
protected abstract void |
proceedToAdvisedMethod()
This is implemented in a runtime-generated subclass. |
|
void |
rethrow()
If the invocation threw a checked exception, then this method throws that exception wrapped as the cause of a new RuntimeException. |
|
MethodInvocation |
setCheckedException(Exception exception)
Sets the checked exception; this can be used to indicate failure for the method, or to cancel the thrown exception (by setting the exception to null). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.tapestry5.plastic.MethodInvocation |
---|
getParameter, setParameter, setReturnValue |
Methods inherited from interface org.apache.tapestry5.plastic.MethodInvocationResult |
---|
getReturnValue |
Constructor Detail |
---|
protected AbstractMethodInvocation(Object instance, InstanceContext instanceContext, MethodInvocationBundle bundle)
Method Detail |
---|
protected void clearCheckedException()
MethodInvocation.setReturnValue(Object)
.
public void rethrow()
MethodInvocationResult
rethrow
in interface MethodInvocationResult
public boolean didThrowCheckedException()
MethodInvocationResult
didThrowCheckedException
in interface MethodInvocationResult
public <T extends Throwable> T getCheckedException(Class<T> exceptionType)
MethodInvocationResult
getCheckedException
in interface MethodInvocationResult
public Object getInstance()
MethodInvocation
getInstance
in interface MethodInvocation
public InstanceContext getInstanceContext()
getInstanceContext
in interface MethodInvocation
public MethodInvocation proceed()
MethodInvocation
MethodAdvice
added to the method, or
ultimately into the actual method implementation. The method may throw a checked exception, which will be caught
and be reported as MethodInvocationResult.didThrowCheckedException()
.
proceed
in interface MethodInvocation
public MethodInvocation setCheckedException(Exception exception)
MethodInvocation
setCheckedException
in interface MethodInvocation
exception
- new checked exception, or null
public <T extends Annotation> boolean hasAnnotation(Class<T> annotationType)
AnnotationAccess
hasAnnotation
in interface AnnotationAccess
public <T extends Annotation> T getAnnotation(Class<T> annotationType)
AnnotationAccess
getAnnotation
in interface AnnotationAccess
public Method getMethod()
MethodInvocation
getMethod
in interface MethodInvocation
protected abstract void proceedToAdvisedMethod()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |