org.jboss.webbeans.introspector
Interface AnnotatedMethod<T>

All Superinterfaces:
AnnotatedItem<T,java.lang.reflect.Method>, AnnotatedMember<T,java.lang.reflect.Method>
All Known Implementing Classes:
AnnotatedMethodImpl, ForwardingAnnotatedMethod, MethodInjectionPoint, WrappedAnnotatedMethod

public interface AnnotatedMethod<T>
extends AnnotatedMember<T,java.lang.reflect.Method>

AnnotatedType provides a uniform access to the annotations on an annotated class defined either in Java or XML

Author:
Pete Muir

Field Summary
static java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> MAPPED_PARAMETER_ANNOTATIONS
           
 
Fields inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
MAPPED_METAANNOTATIONS
 
Method Summary
 java.lang.reflect.Method getAnnotatedMethod()
           
 java.util.List<AnnotatedParameter<?>> getAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationType)
          Gets the list of annotated parameters for a given annotation
 AnnotatedType<?> getDeclaringClass()
          Gets the declaring class
 java.util.List<? extends AnnotatedParameter<?>> getParameters()
          Gets the abstracted parameters of the method
 java.lang.Class<?>[] getParameterTypesAsArray()
          Get the parameter types as an array
 java.lang.String getPropertyName()
          Gets the property name
 MethodSignature getSignature()
           
 T invoke(java.lang.Object instance, java.lang.Object... parameters)
          Invokes the method
 T invokeOnInstance(java.lang.Object instance, java.lang.Object... parameters)
          Invokes the method on the class of the passed instance, not the declaring class.
 boolean isEquivalent(java.lang.reflect.Method method)
          Checks if a this is equivalent to a JLR method
 
Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedMember
getMember
 
Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindings, getBindingsAsArray, getDeclaredMetaAnnotations, getFlattenedTypeHierarchy, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getRawType, getType, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isParameterizedType, isProxyable, isPublic, isStatic
 

Field Detail

MAPPED_PARAMETER_ANNOTATIONS

static final java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> MAPPED_PARAMETER_ANNOTATIONS
Method Detail

getParameters

java.util.List<? extends AnnotatedParameter<?>> getParameters()
Gets the abstracted parameters of the method

Returns:
A list of parameters. Returns an empty list if no parameters are present.

getAnnotatedParameters

java.util.List<AnnotatedParameter<?>> getAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationType)
Gets the list of annotated parameters for a given annotation

Parameters:
metaAnnotationType - The annotation to match
Returns:
A set of matching parameter abstractions. Returns an empty list if there are no matches.

getParameterTypesAsArray

java.lang.Class<?>[] getParameterTypesAsArray()
Get the parameter types as an array


invoke

T invoke(java.lang.Object instance,
         java.lang.Object... parameters)
         throws java.lang.IllegalArgumentException,
                java.lang.IllegalAccessException,
                java.lang.reflect.InvocationTargetException
Invokes the method

Parameters:
instance - The instance to invoke
parameters - The method parameters
Returns:
A reference to the instance
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

invokeOnInstance

T invokeOnInstance(java.lang.Object instance,
                   java.lang.Object... parameters)
                   throws java.lang.IllegalArgumentException,
                          java.lang.SecurityException,
                          java.lang.IllegalAccessException,
                          java.lang.reflect.InvocationTargetException,
                          java.lang.NoSuchMethodException
Invokes the method on the class of the passed instance, not the declaring class. Useful with proxies

Parameters:
instance - The instance to invoke
manager - The Web Beans manager
Returns:
A reference to the instance
Throws:
java.lang.IllegalArgumentException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException

getDeclaringClass

AnnotatedType<?> getDeclaringClass()
Gets the declaring class

Specified by:
getDeclaringClass in interface AnnotatedMember<T,java.lang.reflect.Method>
Returns:
An abstraction of the declaring class

getPropertyName

java.lang.String getPropertyName()
Gets the property name

Returns:
The name

isEquivalent

boolean isEquivalent(java.lang.reflect.Method method)
Checks if a this is equivalent to a JLR method

Parameters:
method - The JLR method
Returns:
true if equivalent

getAnnotatedMethod

java.lang.reflect.Method getAnnotatedMethod()

getSignature

MethodSignature getSignature()


Copyright © 2011. All Rights Reserved.