Class EnhancedAnnotatedParameterImpl<T,X>
- java.lang.Object
-
- org.jboss.weld.annotated.enhanced.jlr.AbstractEnhancedAnnotated<T,Object>
-
- org.jboss.weld.annotated.enhanced.jlr.EnhancedAnnotatedParameterImpl<T,X>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
Annotated
,AnnotatedParameter<X>
,EnhancedAnnotated<T,Object>
,EnhancedAnnotatedParameter<T,X>
public class EnhancedAnnotatedParameterImpl<T,X> extends AbstractEnhancedAnnotated<T,Object> implements EnhancedAnnotatedParameter<T,X>
Represents a parameter 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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EnhancedAnnotatedParameterImpl(AnnotatedParameter<X> annotatedParameter, EnhancedAnnotatedCallable<?,X,?> declaringMember, Map<Class<? extends Annotation>,Annotation> annotationMap, ClassTransformer classTransformer)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotatedCallable<X>
getDeclaringCallable()
Get the declaring method or constructor.EnhancedAnnotatedCallable<?,X,?>
getDeclaringEnhancedCallable()
EnhancedAnnotatedType<X>
getDeclaringType()
Object
getDelegate()
String
getName()
Gets the name of the parameterPackage
getPackage()
int
getPosition()
Get the position of the parameter in the method or constructor argument list.boolean
isFinal()
Indicates if the parameter is finalboolean
isGeneric()
boolean
isPackagePrivate()
boolean
isPrivate()
boolean
isPublic()
Indicates if this annotated item is publicboolean
isStatic()
Indicates if the parameter is staticstatic <T,X>
EnhancedAnnotatedParameter<T,X>of(AnnotatedParameter<X> annotatedParameter, EnhancedAnnotatedCallable<?,X,?> declaringMember, ClassTransformer classTransformer)
AnnotatedParameter<X>
slim()
Returns a lightweight implementation ofAnnotatedParameter
with minimal memory footprint.String
toString()
Gets a string representation of the parameter-
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.AnnotatedParameter
getAnnotations, getJavaParameter
-
Methods inherited from interface org.jboss.weld.annotated.enhanced.EnhancedAnnotated
getActualTypeArguments, getBindingsAsArray, getInterfaceClosure, getJavaClass, getMetaAnnotations, getQualifiers, isParameterizedType, isPrimitive
-
-
-
-
Constructor Detail
-
EnhancedAnnotatedParameterImpl
protected EnhancedAnnotatedParameterImpl(AnnotatedParameter<X> annotatedParameter, EnhancedAnnotatedCallable<?,X,?> declaringMember, Map<Class<? extends Annotation>,Annotation> annotationMap, ClassTransformer classTransformer)
Constructor- Parameters:
annotations
- The annotations arraytype
- The type of the parameter
-
-
Method Detail
-
of
public static <T,X> EnhancedAnnotatedParameter<T,X> of(AnnotatedParameter<X> annotatedParameter, EnhancedAnnotatedCallable<?,X,?> declaringMember, ClassTransformer classTransformer)
-
isFinal
public boolean isFinal()
Indicates if the parameter is final- Specified by:
isFinal
in interfaceEnhancedAnnotated<T,X>
- Returns:
- True if final, false otherwise
- See Also:
EnhancedAnnotated.isFinal()
-
isStatic
public boolean isStatic()
Indicates if the parameter is static- Specified by:
isStatic
in interfaceEnhancedAnnotated<T,X>
- Returns:
- True if static, false otherwise
- See Also:
EnhancedAnnotated.isStatic()
-
isPublic
public boolean isPublic()
Description copied from interface:EnhancedAnnotated
Indicates if this annotated item is public- Specified by:
isPublic
in interfaceEnhancedAnnotated<T,X>
- Returns:
- if public, returns true
-
isPrivate
public boolean isPrivate()
- Specified by:
isPrivate
in interfaceEnhancedAnnotated<T,X>
-
isPackagePrivate
public boolean isPackagePrivate()
- Specified by:
isPackagePrivate
in interfaceEnhancedAnnotated<T,X>
-
isGeneric
public boolean isGeneric()
- Specified by:
isGeneric
in interfaceEnhancedAnnotated<T,X>
-
getPackage
public Package getPackage()
- Specified by:
getPackage
in interfaceEnhancedAnnotated<T,X>
-
getName
public String getName()
Gets the name of the parameter- Specified by:
getName
in interfaceEnhancedAnnotated<T,X>
- Returns:
- The name
- Throws:
IllegalArgumentException
- (not supported)- See Also:
EnhancedAnnotated.getName()
-
toString
public String toString()
Gets a string representation of the parameter
-
getDeclaringCallable
public AnnotatedCallable<X> getDeclaringCallable()
Description copied from interface:AnnotatedParameter
Get the declaring method or constructor.
- Specified by:
getDeclaringCallable
in interfaceAnnotatedParameter<T>
- Returns:
- the declaring callable
-
getDeclaringEnhancedCallable
public EnhancedAnnotatedCallable<?,X,?> getDeclaringEnhancedCallable()
- Specified by:
getDeclaringEnhancedCallable
in interfaceEnhancedAnnotatedParameter<T,X>
-
getPosition
public int getPosition()
Description copied from interface:AnnotatedParameter
Get the position of the parameter in the method or constructor argument list.
- Specified by:
getPosition
in interfaceAnnotatedParameter<T>
- Returns:
- the position of the parameter
-
getDelegate
public Object getDelegate()
- Specified by:
getDelegate
in classAbstractEnhancedAnnotated<T,Object>
-
getDeclaringType
public EnhancedAnnotatedType<X> getDeclaringType()
- Specified by:
getDeclaringType
in interfaceEnhancedAnnotatedParameter<T,X>
-
slim
public AnnotatedParameter<X> slim()
Description copied from interface:EnhancedAnnotatedParameter
Returns a lightweight implementation ofAnnotatedParameter
with minimal memory footprint.- Specified by:
slim
in interfaceEnhancedAnnotated<T,X>
- Specified by:
slim
in interfaceEnhancedAnnotatedParameter<T,X>
- Returns:
- the slim version of this
AnnotatedParameter
-
-