org.apache.tapestry5.ioc
Interface Invocation

All Known Subinterfaces:
ComponentMethodInvocation

Deprecated. Deprecated in 5.3, to be removed in 5.4. Replaced with MethodInvocation.

public interface Invocation

A method invocation passed to a MethodAdvice.


Method Summary
<T extends Annotation>
T
getMethodAnnotation(Class<T> annotationClass)
          Deprecated. Returns the annotation, placed on the method being invoked, for the specified type.
 String getMethodName()
          Deprecated. Returns the name of the method being invoked.
 Object getParameter(int index)
          Deprecated. Returns the indicated parameter (may return null if the parameter is null).
 int getParameterCount()
          Deprecated. Returns the number of parameters passed to the method.
 Class getParameterType(int index)
          Deprecated. Returns the type of the parameter at the index.
 Object getResult()
          Deprecated. The return value after proceed(), which may be null.
 Class getResultType()
          Deprecated. Returns the type of the method result, which may be a primitive type (i.e., int.class) or even void (void.class).
<T extends Throwable>
T
getThrown(Class<T> throwableClass)
          Deprecated. After invoking proceed(), used to obtain the thrown (checked) exception, if assignable to the provided type.
 boolean isFail()
          Deprecated. If true, then the proceeded invocation threw a checked exception.
 void override(int index, Object newParameter)
          Deprecated. Replaces a parameter in the invocation.
 void overrideResult(Object newResult)
          Deprecated. Overrides the result.
 void overrideThrown(Exception thrown)
          Deprecated. Overrides the thrown exception.
 void proceed()
          Deprecated. Proceed with the invocation of the advised method.
 void rethrow()
          Deprecated. If the invocation failed (with a checked exception), then rethrow the exception wrapped in a RuntimeException.
 

Method Detail

getMethodName

String getMethodName()
Deprecated. 
Returns the name of the method being invoked.


getResultType

Class getResultType()
Deprecated. 
Returns the type of the method result, which may be a primitive type (i.e., int.class) or even void (void.class).


getParameterCount

int getParameterCount()
Deprecated. 
Returns the number of parameters passed to the method.


getParameterType

Class getParameterType(int index)
Deprecated. 
Returns the type of the parameter at the index.


getParameter

Object getParameter(int index)
Deprecated. 
Returns the indicated parameter (may return null if the parameter is null).


override

void override(int index,
              Object newParameter)
Deprecated. 
Replaces a parameter in the invocation.

Parameters:
index - of parameter to update
newParameter - new parameter value (may be null)

proceed

void proceed()
Deprecated. 
Proceed with the invocation of the advised method. If the invocation results in a runtime exception, that is thrown. A checked exception is detected by invoking isFail().


isFail

boolean isFail()
Deprecated. 
If true, then the proceeded invocation threw a checked exception.


rethrow

void rethrow()
Deprecated. 
If the invocation failed (with a checked exception), then rethrow the exception wrapped in a RuntimeException.

Since:
5.2.0

getThrown

<T extends Throwable> T getThrown(Class<T> throwableClass)
Deprecated. 
After invoking proceed(), used to obtain the thrown (checked) exception, if assignable to the provided type.

Parameters:
throwableClass - the type of exception to match
Returns:
the exception, if the proceeded invocation threw a checked exception, and the exception is assignable to the provided type. In other cases, null is returned.

overrideThrown

void overrideThrown(Exception thrown)
Deprecated. 
Overrides the thrown exception. The passed exception should be a checked exception of the method. Note that for runtime exceptions, or even Errors, those can just be thrown. Sets the fail flag.

Parameters:
thrown -
Throws:
IllegalArgumentException - if thrown is null, or not a declared exception of the method

getResult

Object getResult()
Deprecated. 
The return value after proceed(), which may be null.


overrideResult

void overrideResult(Object newResult)
Deprecated. 
Overrides the result. Clears the thrown exception (if any).


getMethodAnnotation

<T extends Annotation> T getMethodAnnotation(Class<T> annotationClass)
Deprecated. 
Returns the annotation, placed on the method being invoked, for the specified type. If such an annotation is present, else null.

Parameters:
annotationClass - the Class object corresponding to the annotation type
Returns:
method's annotation for the specified annotation type if present on this element, else null
Since:
5.3


Copyright © 2003-2012 The Apache Software Foundation.