|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.webbeans.introspector.jlr.AbstractAnnotatedItem<T,S>
org.jboss.webbeans.introspector.jlr.AbstractAnnotatedMember<T,java.lang.reflect.Method>
org.jboss.webbeans.introspector.jlr.AnnotatedMethodImpl<T>
T
- public class AnnotatedMethodImpl<T>
Represents an annotated method This class is immutable and therefore threadsafe
Field Summary |
---|
Fields inherited from interface org.jboss.webbeans.introspector.AnnotatedMethod |
---|
MAPPED_PARAMETER_ANNOTATIONS |
Fields inherited from interface org.jboss.webbeans.introspector.AnnotatedItem |
---|
MAPPED_METAANNOTATIONS |
Constructor Summary | |
---|---|
protected |
AnnotatedMethodImpl(java.lang.reflect.Method method,
AnnotatedType<?> declaringClass)
Constructor Initializes the superclass with the built annotation map, sets the method and declaring class abstraction and detects the actual type arguments |
Method Summary | ||
---|---|---|
boolean |
equals(java.lang.Object other)
Compares two AbstractAnnotatedItems |
|
java.lang.reflect.Method |
getAnnotatedMethod()
|
|
java.util.List<AnnotatedParameter<?>> |
getAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets the list of annotated parameters for a given annotation |
|
AnnotatedType<?> |
getDeclaringClass()
Gets the declaring class |
|
java.lang.reflect.Method |
getDelegate()
|
|
java.util.List<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()
|
|
int |
hashCode()
Gets the hash code of the actual type |
|
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 |
|
static
|
of(java.lang.reflect.Method method,
AnnotatedType<?> declaringClass)
|
|
java.lang.String |
toString()
Gets a string representation of the member |
Methods inherited from class org.jboss.webbeans.introspector.jlr.AbstractAnnotatedMember |
---|
getMember, getName, getValue, isFinal, isPublic, isStatic, isTransient |
Methods inherited from class org.jboss.webbeans.introspector.jlr.AbstractAnnotatedItem |
---|
getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindings, getBindingsAsArray, getDeclaredMetaAnnotations, getFlattenedTypeHierarchy, getMetaAnnotations, getMetaAnnotationsAsArray, getRawType, getType, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isParameterizedType, isProxyable |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
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 |
Constructor Detail |
---|
protected AnnotatedMethodImpl(java.lang.reflect.Method method, AnnotatedType<?> declaringClass)
method
- The underlying methoddeclaringClass
- The declaring class abstractionMethod Detail |
---|
public static <T> AnnotatedMethodImpl<T> of(java.lang.reflect.Method method, AnnotatedType<?> declaringClass)
public java.lang.reflect.Method getAnnotatedMethod()
getAnnotatedMethod
in interface AnnotatedMethod<T>
public java.lang.reflect.Method getDelegate()
getDelegate
in class AbstractAnnotatedItem<T,java.lang.reflect.Method>
public java.util.List<AnnotatedParameter<?>> getParameters()
AnnotatedMethod
getParameters
in interface AnnotatedMethod<T>
public java.lang.Class<?>[] getParameterTypesAsArray()
AnnotatedMethod
getParameterTypesAsArray
in interface AnnotatedMethod<T>
public java.util.List<AnnotatedParameter<?>> getAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
AnnotatedMethod
getAnnotatedParameters
in interface AnnotatedMethod<T>
annotationType
- The annotation to match
public boolean equals(java.lang.Object other)
AbstractAnnotatedItem
equals
in class AbstractAnnotatedItem<T,java.lang.reflect.Method>
other
- The other item
public boolean isEquivalent(java.lang.reflect.Method method)
AnnotatedMethod
isEquivalent
in interface AnnotatedMethod<T>
method
- The JLR method
public int hashCode()
AbstractAnnotatedItem
hashCode
in class AbstractAnnotatedItem<T,java.lang.reflect.Method>
public 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
AnnotatedMethod
invokeOnInstance
in interface AnnotatedMethod<T>
instance
- The instance to invoke
java.lang.IllegalArgumentException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
public T invoke(java.lang.Object instance, java.lang.Object... parameters) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
AnnotatedMethod
invoke
in interface AnnotatedMethod<T>
instance
- The instance to invokeparameters
- The method parameters
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public java.lang.String getPropertyName()
AnnotatedMethod
getPropertyName
in interface AnnotatedMethod<T>
public AnnotatedType<?> getDeclaringClass()
AnnotatedMethod
getDeclaringClass
in interface AnnotatedMember<T,java.lang.reflect.Method>
getDeclaringClass
in interface AnnotatedMethod<T>
public java.lang.String toString()
AbstractAnnotatedMember
toString
in class AbstractAnnotatedMember<T,java.lang.reflect.Method>
public MethodSignature getSignature()
getSignature
in interface AnnotatedMethod<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |