org.apache.tapestry5.ioc
Interface MethodAdviceReceiver

All Superinterfaces:
AnnotationAccess
All Known Subinterfaces:
AspectInterceptorBuilder<T>
All Known Implementing Classes:
AbtractAspectInterceptorBuilder, AspectInterceptorBuilderImpl

public interface MethodAdviceReceiver
extends AnnotationAccess

Interface used with service advisor methods to define advice. Allows advice on specific methods, or on all methods.


Method Summary
 void adviseAllMethods(MethodAdvice advice)
          Deprecated. Deprecated in 5.3, to be removed in 5.4. Replaced with adviseAllMethods(org.apache.tapestry5.plastic.MethodAdvice).
 void adviseAllMethods(MethodAdvice advice)
          Advises all methods of the interface with the given advice.
 void adviseMethod(Method method, MethodAdvice advice)
          Deprecated. Deprecated in 5.3, to be removed in 5.4. Replaced with adviseMethod(Method, org.apache.tapestry5.plastic.MethodAdvice)
 void adviseMethod(Method method, MethodAdvice advice)
          Adds advice for a specific method of the aspect interceptor being constructed.
 Class getInterface()
          Returns the interface for which methods may be advised.
<T extends Annotation>
T
getMethodAnnotation(Method method, Class<T> annotationType)
          Gets an annotation from a method, via AnnotationAccess.getMethodAnnotationProvider(String, Class...).
 
Methods inherited from interface org.apache.tapestry5.ioc.AnnotationAccess
getClassAnnotationProvider, getMethodAnnotationProvider
 

Method Detail

adviseMethod

void adviseMethod(Method method,
                  MethodAdvice advice)
Deprecated. Deprecated in 5.3, to be removed in 5.4. Replaced with adviseMethod(Method, org.apache.tapestry5.plastic.MethodAdvice)

Adds advice for a specific method of the aspect interceptor being constructed.

Parameters:
method - method (of the interface for which an interceptor is being constructed) to be advised. Multiple advice is allowed for a single method; the advice will be executed in the order it is added.
advice - the advice for this particular method. Advice must be threadsafe.

adviseAllMethods

void adviseAllMethods(MethodAdvice advice)
Deprecated. Deprecated in 5.3, to be removed in 5.4. Replaced with adviseAllMethods(org.apache.tapestry5.plastic.MethodAdvice).

Advises all methods of the interface with the given advice.


adviseMethod

void adviseMethod(Method method,
                  MethodAdvice advice)
Adds advice for a specific method of the aspect interceptor being constructed.

Parameters:
method - method (of the interface for which an interceptor is being constructed) to be advised. Multiple advice is allowed for a single method; the advice will be executed in the order it is added.
advice - the advice for this particular method. Advice must be threadsafe.
Since:
5.3

adviseAllMethods

void adviseAllMethods(MethodAdvice advice)
Advises all methods of the interface with the given advice.

Since:
5.3

getInterface

Class getInterface()
Returns the interface for which methods may be advised.

Since:
5.1.0.0
See Also:
MethodIterator

getMethodAnnotation

<T extends Annotation> T getMethodAnnotation(Method method,
                                             Class<T> annotationType)
Gets an annotation from a method, via AnnotationAccess.getMethodAnnotationProvider(String, Class...).

Type Parameters:
T - type of annotation
Parameters:
method - method to search
annotationType - type of annotation
Returns:
the annotation found on the underlying implementation class (if known) or service interface, or null if not found


Copyright © 2003-2012 The Apache Software Foundation.