Class EnhancedAnnotatedMethodImpl<T,X>
- java.lang.Object
-
- org.jboss.weld.annotated.enhanced.jlr.AbstractEnhancedAnnotated<T,S>
-
- org.jboss.weld.annotated.enhanced.jlr.AbstractEnhancedAnnotatedMember<T,X,S>
-
- org.jboss.weld.annotated.enhanced.jlr.AbstractEnhancedAnnotatedCallable<T,X,Method>
-
- org.jboss.weld.annotated.enhanced.jlr.EnhancedAnnotatedMethodImpl<T,X>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
javax.enterprise.inject.spi.Annotated
,javax.enterprise.inject.spi.AnnotatedCallable<X>
,javax.enterprise.inject.spi.AnnotatedMember<X>
,javax.enterprise.inject.spi.AnnotatedMethod<X>
,EnhancedAnnotated<T,Method>
,EnhancedAnnotatedCallable<T,X,Method>
,EnhancedAnnotatedMember<T,X,Method>
,EnhancedAnnotatedMethod<T,X>
public class EnhancedAnnotatedMethodImpl<T,X> extends AbstractEnhancedAnnotatedCallable<T,X,Method> implements EnhancedAnnotatedMethod<T,X>
Represents an annotated method This class is immutable and therefore threadsafe- Author:
- Pete Muir
-
-
Field Summary
-
Fields inherited from interface org.jboss.weld.annotated.enhanced.EnhancedAnnotated
MAPPED_DECLARED_METAANNOTATIONS, MAPPED_METAANNOTATIONS
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Method
getDelegate()
List<EnhancedAnnotatedParameter<?,X>>
getEnhancedParameters()
Gets the abstracted parameters of the methodList<EnhancedAnnotatedParameter<?,X>>
getEnhancedParameters(Class<? extends Annotation> annotationType)
Get the parameters annotated with a given annotation type.List<javax.enterprise.inject.spi.AnnotatedParameter<X>>
getParameters()
Class<?>[]
getParameterTypesAsArray()
Get the parameter types as an arrayString
getPropertyName()
Gets the property nameMethodSignature
getSignature()
boolean
isEquivalent(Method method)
Checks if a this is equivalent to a JLR methodboolean
isGeneric()
static <T,X,Y extends X>
EnhancedAnnotatedMethodImpl<T,X>of(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod, EnhancedAnnotatedType<Y> declaringClass, ClassTransformer classTransformer)
javax.enterprise.inject.spi.AnnotatedMethod<X>
slim()
Returns a lightweight implementation ofAnnotatedMethod
with minimal memory footprint.String
toString()
Gets a string representation of the member-
Methods inherited from class org.jboss.weld.annotated.enhanced.jlr.AbstractEnhancedAnnotatedCallable
validateParameterCount
-
Methods inherited from class org.jboss.weld.annotated.enhanced.jlr.AbstractEnhancedAnnotatedMember
getDeclaringType, getJavaMember, getName, getPackage, isFinal, isPackagePrivate, isPrivate, isPublic, isStatic, isTransient
-
Methods inherited from class org.jboss.weld.annotated.enhanced.jlr.AbstractEnhancedAnnotated
addMetaAnnotations, buildAnnotationMap, getActualTypeArguments, getAnnotation, getAnnotations, getBaseType, getBindingsAsArray, getInterfaceClosure, getJavaClass, getMetaAnnotations, getQualifiers, getTypeClosure, isAnnotationPresent, isParameterizedType, isPrimitive, processMetaAnnotations, processMetaAnnotations, processMetaAnnotations
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.Annotated
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent
-
Methods inherited from interface javax.enterprise.inject.spi.AnnotatedMethod
getAnnotations, getJavaMember
-
Methods inherited from interface org.jboss.weld.annotated.enhanced.EnhancedAnnotated
getActualTypeArguments, getBindingsAsArray, getInterfaceClosure, getJavaClass, getMetaAnnotations, getName, getPackage, getQualifiers, isFinal, isPackagePrivate, isParameterizedType, isPrimitive, isPrivate, isPublic, isStatic
-
Methods inherited from interface org.jboss.weld.annotated.enhanced.EnhancedAnnotatedMember
getDeclaringType
-
-
-
-
Method Detail
-
of
public static <T,X,Y extends X> EnhancedAnnotatedMethodImpl<T,X> of(javax.enterprise.inject.spi.AnnotatedMethod<X> annotatedMethod, EnhancedAnnotatedType<Y> declaringClass, ClassTransformer classTransformer)
-
getDelegate
public Method getDelegate()
- Specified by:
getDelegate
in classAbstractEnhancedAnnotated<T,Method>
-
getEnhancedParameters
public List<EnhancedAnnotatedParameter<?,X>> getEnhancedParameters()
Description copied from interface:EnhancedAnnotatedCallable
Gets the abstracted parameters of the method- Specified by:
getEnhancedParameters
in interfaceEnhancedAnnotatedCallable<T,X,Method>
- Returns:
- A list of parameters. Returns an empty list if no parameters are present.
-
getParameterTypesAsArray
public Class<?>[] getParameterTypesAsArray()
Description copied from interface:EnhancedAnnotatedMethod
Get the parameter types as an array- Specified by:
getParameterTypesAsArray
in interfaceEnhancedAnnotatedMethod<T,X>
-
getEnhancedParameters
public List<EnhancedAnnotatedParameter<?,X>> getEnhancedParameters(Class<? extends Annotation> annotationType)
Description copied from interface:EnhancedAnnotatedMethod
Get the parameters annotated with a given annotation type.- Specified by:
getEnhancedParameters
in interfaceEnhancedAnnotatedCallable<T,X,Method>
- Specified by:
getEnhancedParameters
in interfaceEnhancedAnnotatedMethod<T,X>
- Parameters:
annotationType
- The annotation to match- Returns:
- A set of matching parameter abstractions. Returns an empty list if there are no matches.
-
isEquivalent
public boolean isEquivalent(Method method)
Description copied from interface:EnhancedAnnotatedMethod
Checks if a this is equivalent to a JLR method- Specified by:
isEquivalent
in interfaceEnhancedAnnotatedMethod<T,X>
- Parameters:
method
- The JLR method- Returns:
- true if equivalent
-
getPropertyName
public String getPropertyName()
Description copied from interface:EnhancedAnnotatedMethod
Gets the property name- Specified by:
getPropertyName
in interfaceEnhancedAnnotatedMethod<T,X>
- Returns:
- The name
-
toString
public String toString()
Description copied from class:AbstractEnhancedAnnotatedMember
Gets a string representation of the member- Overrides:
toString
in classAbstractEnhancedAnnotatedMember<T,X,Method>
- Returns:
- A string representation
-
getSignature
public MethodSignature getSignature()
- Specified by:
getSignature
in interfaceEnhancedAnnotatedMethod<T,X>
-
getParameters
public List<javax.enterprise.inject.spi.AnnotatedParameter<X>> getParameters()
- Specified by:
getParameters
in interfacejavax.enterprise.inject.spi.AnnotatedCallable<T>
-
isGeneric
public boolean isGeneric()
- Specified by:
isGeneric
in interfaceEnhancedAnnotated<T,X>
-
slim
public javax.enterprise.inject.spi.AnnotatedMethod<X> slim()
Description copied from interface:EnhancedAnnotatedMethod
Returns a lightweight implementation ofAnnotatedMethod
with minimal memory footprint.- Specified by:
slim
in interfaceEnhancedAnnotated<T,X>
- Specified by:
slim
in interfaceEnhancedAnnotatedCallable<T,X,Method>
- Specified by:
slim
in interfaceEnhancedAnnotatedMember<T,X,Method>
- Specified by:
slim
in interfaceEnhancedAnnotatedMethod<T,X>
- Returns:
- the slim version of this
AnnotatedMethod
-
-