public interface TransformMethod extends AnnotationProvider, Comparable<TransformMethod>
ClassTransformation
, allowing
for access and manipulation of the method.
The natural sorting order of TransformMethods is the same as TransformMethodSignature
.
Modifier and Type | Method and Description |
---|---|
void |
addAdvice(ComponentMethodAdvice advice)
Add advice for the method; the advice will be threaded into method invocations of the indicated method.
|
void |
addOperationAfter(ComponentInstanceOperation operation)
Adds an operation that will execute after any
further advice or operations.
|
void |
addOperationBefore(ComponentInstanceOperation operation)
Adds an operation that will execute before any
further advice or operations.
|
MethodAccess |
getAccess()
Returns an object that can be used to invoke the method on an instance of the component class (regardless
of the actual visibility of the method).
|
String |
getMethodIdentifier()
Converts a signature to a string used to identify the method; this consists of the
TransformMethodSignature.getMediumDescription() appended with source file information
and line number
information (when available). |
String |
getName()
Returns just the name of the method.
|
<A extends Annotation> |
getParameterAnnotation(int index,
Class<A> annotationType)
Gets an annotation on a parameter of the method.
|
TransformMethodSignature |
getSignature() |
boolean |
isOverride()
Returns true if the method is an override of a method from the parent class.
|
getAnnotation
compareTo
TransformMethodSignature getSignature()
MethodAccess getAccess()
void addAdvice(ComponentMethodAdvice advice)
Invocation.proceed()
) in the order the advice
is added. The last advice will proceed to the original method implementation.advice
- to receive control when the method is invokedaddOperationAfter(ComponentInstanceOperation)
,
addOperationBefore(ComponentInstanceOperation)
void addOperationBefore(ComponentInstanceOperation operation)
Invocation.proceed()
.void addOperationAfter(ComponentInstanceOperation operation)
Invocation.proceed()
before invoking the operation.String getMethodIdentifier()
TransformMethodSignature.getMediumDescription()
appended with source file information
and line number
information (when available).boolean isOverride()
<A extends Annotation> A getParameterAnnotation(int index, Class<A> annotationType)
index
- index of parameterannotationType
- type of annotation to check forCopyright © 2003-2012 The Apache Software Foundation.