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

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

public interface AnnotatedMethod<T>
extends AnnotatedItem<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.util.List<AnnotatedParameter<java.lang.Object>> 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<AnnotatedParameter<java.lang.Object>> 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
 T invoke(java.lang.Object instance, Manager manager)
          Invokes the method
 T invoke(java.lang.Object instance, java.lang.Object... parameters)
          Invokes the method
 T invokeOnInstance(java.lang.Object instance, Manager manager)
          Invokes the method on the class of the passed instance, not the declaring class.
 T invokeWithSpecialValue(java.lang.Object instance, java.lang.Class<? extends java.lang.annotation.Annotation> specialParam, java.lang.Object specialVal, Manager manager)
          Invokes the observer method
 
Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
getActualTypeArguments, getAnnotation, getAnnotations, getBindingTypes, getBindingTypesAsArray, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getType, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isFinal, isProxyable, 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<AnnotatedParameter<java.lang.Object>> 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<java.lang.Object>> 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,
         Manager manager)
Invokes the method

Parameters:
instance - The instance to invoke
manager - The Web Beans manager
Returns:
A reference to the instance

invokeOnInstance

T invokeOnInstance(java.lang.Object instance,
                   Manager manager)
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

invokeWithSpecialValue

T invokeWithSpecialValue(java.lang.Object instance,
                         java.lang.Class<? extends java.lang.annotation.Annotation> specialParam,
                         java.lang.Object specialVal,
                         Manager manager)
Invokes the observer method

Parameters:
instance - The instance to invoke
event - the event object
manager - The Web Beans manager
Returns:
A reference to the instance

invoke

T invoke(java.lang.Object instance,
         java.lang.Object... parameters)
Invokes the method

Parameters:
instance - The instance to invoke
parameters - The method parameters
Returns:
A reference to the instance

getDeclaringClass

AnnotatedType<?> getDeclaringClass()
Gets the declaring class

Returns:
An abstraction of the declaring class

getPropertyName

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

Returns:
The name


Copyright © 2008. All Rights Reserved.