T
- the type of the classpublic class EnhancedAnnotatedTypeImpl<T> extends AbstractEnhancedAnnotated<T,Class<T>> implements EnhancedAnnotatedType<T>
MAPPED_DECLARED_METAANNOTATIONS, MAPPED_METAANNOTATIONS
Modifier | Constructor and Description |
---|---|
protected |
EnhancedAnnotatedTypeImpl(SlimAnnotatedType<T> annotatedType,
Map<Class<? extends Annotation>,Annotation> annotationMap,
Map<Class<? extends Annotation>,Annotation> declaredAnnotationMap,
ClassTransformer classTransformer) |
Modifier and Type | Method and Description |
---|---|
<U> EnhancedAnnotatedType<? extends U> |
asEnhancedSubclass(EnhancedAnnotatedType<U> clazz) |
protected com.google.common.collect.Multimap<Class<? extends Annotation>,EnhancedAnnotatedMethod<?,? super T>> |
buildAnnotatedMethodMultimap(Set<EnhancedAnnotatedMethod<?,? super T>> effectiveMethods) |
protected com.google.common.collect.Multimap<Class<? extends Annotation>,EnhancedAnnotatedMethod<?,? super T>> |
buildAnnotatedParameterMethodMultimap(Set<EnhancedAnnotatedMethod<?,? super T>> effectiveMethods) |
<S> S |
cast(Object object) |
boolean |
equals(Object obj) |
Class<? extends T> |
getAnnotatedClass()
Gets the implementing class
|
Set<javax.enterprise.inject.spi.AnnotatedConstructor<T>> |
getConstructors() |
EnhancedAnnotatedConstructor<T> |
getDeclaredEnhancedConstructor(ConstructorSignature signature)
Get the constructor which matches the argument list provided
|
<F> EnhancedAnnotatedField<F,?> |
getDeclaredEnhancedField(String fieldName)
Get a field by name
|
Collection<EnhancedAnnotatedField<?,? super T>> |
getDeclaredEnhancedFields()
Gets all fields declared on this class only.
|
Collection<EnhancedAnnotatedField<?,? super T>> |
getDeclaredEnhancedFields(Class<? extends Annotation> annotationType)
Gets all fields which are annotated with the given annotation type on this
class only.
|
EnhancedAnnotatedMethod<?,?> |
getDeclaredEnhancedMethod(Method method) |
<M> EnhancedAnnotatedMethod<M,?> |
getDeclaredEnhancedMethod(MethodSignature signature)
Get a method by name
|
Collection<EnhancedAnnotatedMethod<?,? super T>> |
getDeclaredEnhancedMethods()
Gets all methods on the type
|
Collection<EnhancedAnnotatedMethod<?,? super T>> |
getDeclaredEnhancedMethods(Class<? extends Annotation> annotationType)
Gets all methods annotated with annotationType
|
Collection<EnhancedAnnotatedMethod<?,? super T>> |
getDeclaredEnhancedMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
Gets declared with parameters annotated with annotationType
|
Set<Annotation> |
getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
Gets all annotations which are declared on this annotated item with the
given meta annotation type
|
Class<T> |
getDelegate()
Gets the delegate (class)
|
Collection<EnhancedAnnotatedConstructor<T>> |
getEnhancedConstructors()
Gets all constructors
|
Collection<EnhancedAnnotatedConstructor<T>> |
getEnhancedConstructors(Class<? extends Annotation> annotationType)
Gets constructors with given annotation type
|
Collection<EnhancedAnnotatedField<?,? super T>> |
getEnhancedFields()
Gets the abstracted fields of the class
Initializes the fields if they are null
|
Collection<EnhancedAnnotatedField<?,?>> |
getEnhancedFields(Class<? extends Annotation> annotationType)
Gets the abstracted field annotated with a specific annotation type
If the fields map is null, initialize it first
|
EnhancedAnnotatedMethod<?,?> |
getEnhancedMethod(Method methodDescriptor)
Find the annotated method for a given methodDescriptor
|
<M> EnhancedAnnotatedMethod<M,?> |
getEnhancedMethod(MethodSignature signature)
Get a method by name
|
Collection<EnhancedAnnotatedMethod<?,? super T>> |
getEnhancedMethods()
Gets all methods on the type including those declared on a superclass of
EnhancedAnnotated.getJavaClass() . |
Collection<EnhancedAnnotatedMethod<?,? super T>> |
getEnhancedMethods(Class<? extends Annotation> annotationType)
Gets the abstracted methods that have a certain annotation type present
If the annotated methods map is null, initialize it first
|
Collection<EnhancedAnnotatedMethod<?,? super T>> |
getEnhancedMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
Gets all methods with parameters annotated with annotationType including those declared on a superclass of
EnhancedAnnotated.getJavaClass() . |
EnhancedAnnotatedType<? super T> |
getEnhancedSuperclass()
Gets the superclass abstraction of the type
|
Set<javax.enterprise.inject.spi.AnnotatedField<? super T>> |
getFields() |
Set<javax.enterprise.inject.spi.AnnotatedMethod<? super T>> |
getMethods() |
String |
getName()
Gets the name of the type
|
EnhancedAnnotatedConstructor<T> |
getNoArgsEnhancedConstructor()
Gets the no-args constructor
|
protected Set<EnhancedAnnotatedMethod<?,? super T>> |
getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType,
Set<EnhancedAnnotatedMethod<?,? super T>> methods) |
protected Set<EnhancedAnnotatedMethod<?,? super T>> |
getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType,
Set<EnhancedAnnotatedMethod<?,? super T>> methods,
boolean skipOverridingBridgeMethods) |
Package |
getPackage() |
String |
getSimpleName() |
int |
hashCode() |
boolean |
isAbstract() |
boolean |
isAnonymousClass() |
boolean |
isDiscovered() |
boolean |
isEnum() |
boolean |
isEquivalent(Class<?> clazz)
Check if this is equivalent to a java class
|
boolean |
isFinal()
Indicates if the type if final
|
boolean |
isGeneric() |
boolean |
isLocalClass() |
boolean |
isMemberClass() |
boolean |
isPackagePrivate() |
boolean |
isPrivate() |
boolean |
isPublic()
Indicates if this annotated item is public
|
boolean |
isSerializable() |
boolean |
isStatic()
Indicates if the type is static
|
static <T> EnhancedAnnotatedType<T> |
of(SlimAnnotatedType<T> annotatedType,
ClassTransformer classTransformer) |
SlimAnnotatedType<T> |
slim()
Returns a lightweight implementation of
AnnotatedType with minimal memory footprint. |
String |
toString()
Gets a string representation of the class
|
addMetaAnnotations, addMetaAnnotations, buildAnnotationMap, buildAnnotationMap, getActualTypeArguments, getAnnotation, getAnnotations, getBaseType, getBindingsAsArray, getInterfaceClosure, getJavaClass, getMetaAnnotations, getQualifiers, getTypeClosure, isAnnotationPresent, isParameterizedType, isPrimitive
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isParameterizedType
getActualTypeArguments, getBindingsAsArray, getInterfaceClosure, getJavaClass, getMetaAnnotations, getQualifiers, isPrimitive
protected EnhancedAnnotatedTypeImpl(SlimAnnotatedType<T> annotatedType, Map<Class<? extends Annotation>,Annotation> annotationMap, Map<Class<? extends Annotation>,Annotation> declaredAnnotationMap, ClassTransformer classTransformer)
public static <T> EnhancedAnnotatedType<T> of(SlimAnnotatedType<T> annotatedType, ClassTransformer classTransformer)
protected Set<EnhancedAnnotatedMethod<?,? super T>> getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType, Set<EnhancedAnnotatedMethod<?,? super T>> methods)
protected Set<EnhancedAnnotatedMethod<?,? super T>> getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType, Set<EnhancedAnnotatedMethod<?,? super T>> methods, boolean skipOverridingBridgeMethods)
annotatedType
- methods
- skipOverridingBridgeMethods
- If set to true
the returning set will not contain methods overriden by a bridge methodprotected com.google.common.collect.Multimap<Class<? extends Annotation>,EnhancedAnnotatedMethod<?,? super T>> buildAnnotatedMethodMultimap(Set<EnhancedAnnotatedMethod<?,? super T>> effectiveMethods)
protected com.google.common.collect.Multimap<Class<? extends Annotation>,EnhancedAnnotatedMethod<?,? super T>> buildAnnotatedParameterMethodMultimap(Set<EnhancedAnnotatedMethod<?,? super T>> effectiveMethods)
public Class<? extends T> getAnnotatedClass()
public Class<T> getDelegate()
getDelegate
in class AbstractEnhancedAnnotated<T,Class<T>>
public Collection<EnhancedAnnotatedField<?,? super T>> getEnhancedFields()
getEnhancedFields
in interface EnhancedAnnotatedType<T>
public Collection<EnhancedAnnotatedField<?,? super T>> getDeclaredEnhancedFields()
EnhancedAnnotatedType
getDeclaredEnhancedFields
in interface EnhancedAnnotatedType<T>
public <F> EnhancedAnnotatedField<F,?> getDeclaredEnhancedField(String fieldName)
EnhancedAnnotatedType
getDeclaredEnhancedField
in interface EnhancedAnnotatedType<T>
F
- the expected type of the fieldfieldName
- the field namepublic Collection<EnhancedAnnotatedField<?,? super T>> getDeclaredEnhancedFields(Class<? extends Annotation> annotationType)
EnhancedAnnotatedType
getDeclaredEnhancedFields
in interface EnhancedAnnotatedType<T>
annotationType
- The annotation to matchpublic EnhancedAnnotatedConstructor<T> getDeclaredEnhancedConstructor(ConstructorSignature signature)
EnhancedAnnotatedType
getDeclaredEnhancedConstructor
in interface EnhancedAnnotatedType<T>
public Collection<EnhancedAnnotatedField<?,?>> getEnhancedFields(Class<? extends Annotation> annotationType)
getEnhancedFields
in interface EnhancedAnnotatedType<T>
annotationType
- The annotation type to matchpublic boolean isLocalClass()
isLocalClass
in interface EnhancedAnnotatedType<T>
public boolean isAnonymousClass()
isAnonymousClass
in interface EnhancedAnnotatedType<T>
public boolean isMemberClass()
isMemberClass
in interface EnhancedAnnotatedType<T>
public boolean isAbstract()
isAbstract
in interface EnhancedAnnotatedType<T>
public boolean isEnum()
isEnum
in interface EnhancedAnnotatedType<T>
public boolean isSerializable()
isSerializable
in interface EnhancedAnnotatedType<T>
public Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethods(Class<? extends Annotation> annotationType)
getEnhancedMethods
in interface EnhancedAnnotatedType<T>
annotationType
- The annotation type to matchEnhancedAnnotatedType.getEnhancedMethods(Class)
public Collection<EnhancedAnnotatedMethod<?,? super T>> getDeclaredEnhancedMethods(Class<? extends Annotation> annotationType)
EnhancedAnnotatedType
getDeclaredEnhancedMethods
in interface EnhancedAnnotatedType<T>
annotationType
- The annotation to matchpublic Collection<EnhancedAnnotatedConstructor<T>> getEnhancedConstructors()
EnhancedAnnotatedType
getEnhancedConstructors
in interface EnhancedAnnotatedType<T>
public Collection<EnhancedAnnotatedConstructor<T>> getEnhancedConstructors(Class<? extends Annotation> annotationType)
getEnhancedConstructors
in interface EnhancedAnnotatedType<T>
annotationType
- The annotation type to matchEnhancedAnnotatedType.getEnhancedConstructors(Class)
public EnhancedAnnotatedConstructor<T> getNoArgsEnhancedConstructor()
EnhancedAnnotatedType
getNoArgsEnhancedConstructor
in interface EnhancedAnnotatedType<T>
public Collection<EnhancedAnnotatedMethod<?,? super T>> getDeclaredEnhancedMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
EnhancedAnnotatedType
getDeclaredEnhancedMethodsWithAnnotatedParameters
in interface EnhancedAnnotatedType<T>
annotationType
- The annotation to matchpublic EnhancedAnnotatedMethod<?,?> getEnhancedMethod(Method methodDescriptor)
EnhancedAnnotatedType
getEnhancedMethod
in interface EnhancedAnnotatedType<T>
public Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethods()
EnhancedAnnotatedType
EnhancedAnnotated.getJavaClass()
. Overridden methods are not returned.getEnhancedMethods
in interface EnhancedAnnotatedType<T>
public EnhancedAnnotatedMethod<?,?> getDeclaredEnhancedMethod(Method method)
getDeclaredEnhancedMethod
in interface EnhancedAnnotatedType<T>
public Collection<EnhancedAnnotatedMethod<?,? super T>> getDeclaredEnhancedMethods()
EnhancedAnnotatedType
getDeclaredEnhancedMethods
in interface EnhancedAnnotatedType<T>
public <M> EnhancedAnnotatedMethod<M,?> getDeclaredEnhancedMethod(MethodSignature signature)
EnhancedAnnotatedType
getDeclaredEnhancedMethod
in interface EnhancedAnnotatedType<T>
M
- the expected return typesignature
- the name of the methodpublic <M> EnhancedAnnotatedMethod<M,?> getEnhancedMethod(MethodSignature signature)
EnhancedAnnotatedType
getEnhancedMethod
in interface EnhancedAnnotatedType<T>
M
- the expected return typesignature
- the name of the methodpublic String toString()
public String getSimpleName()
getSimpleName
in interface EnhancedAnnotatedType<T>
public boolean isStatic()
isStatic
in interface EnhancedAnnotated<T,Class<T>>
EnhancedAnnotated.isStatic()
public boolean isFinal()
isFinal
in interface EnhancedAnnotated<T,Class<T>>
EnhancedAnnotated.isFinal()
public boolean isPublic()
EnhancedAnnotated
isPublic
in interface EnhancedAnnotated<T,Class<T>>
public boolean isGeneric()
isGeneric
in interface EnhancedAnnotated<T,Class<T>>
public String getName()
getName
in interface EnhancedAnnotated<T,Class<T>>
EnhancedAnnotated.getName()
public EnhancedAnnotatedType<? super T> getEnhancedSuperclass()
getEnhancedSuperclass
in interface EnhancedAnnotatedType<T>
public boolean isEquivalent(Class<?> clazz)
EnhancedAnnotatedType
isEquivalent
in interface EnhancedAnnotatedType<T>
clazz
- The Java classpublic boolean isPrivate()
isPrivate
in interface EnhancedAnnotated<T,Class<T>>
public boolean isPackagePrivate()
isPackagePrivate
in interface EnhancedAnnotated<T,Class<T>>
public Package getPackage()
getPackage
in interface EnhancedAnnotated<T,Class<T>>
public <U> EnhancedAnnotatedType<? extends U> asEnhancedSubclass(EnhancedAnnotatedType<U> clazz)
asEnhancedSubclass
in interface EnhancedAnnotatedType<T>
public <S> S cast(Object object)
cast
in interface EnhancedAnnotatedType<T>
public Set<javax.enterprise.inject.spi.AnnotatedConstructor<T>> getConstructors()
getConstructors
in interface javax.enterprise.inject.spi.AnnotatedType<T>
public Set<javax.enterprise.inject.spi.AnnotatedField<? super T>> getFields()
getFields
in interface javax.enterprise.inject.spi.AnnotatedType<T>
public Set<javax.enterprise.inject.spi.AnnotatedMethod<? super T>> getMethods()
getMethods
in interface javax.enterprise.inject.spi.AnnotatedType<T>
public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
EnhancedAnnotatedType
getDeclaredMetaAnnotations
in interface EnhancedAnnotatedType<T>
public boolean isDiscovered()
isDiscovered
in interface EnhancedAnnotatedType<T>
public SlimAnnotatedType<T> slim()
EnhancedAnnotatedType
AnnotatedType
with minimal memory footprint.slim
in interface EnhancedAnnotated<T,Class<T>>
slim
in interface EnhancedAnnotatedType<T>
AnnotatedType
public Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
EnhancedAnnotatedType
EnhancedAnnotated.getJavaClass()
. Overridden methods are not returned.getEnhancedMethodsWithAnnotatedParameters
in interface EnhancedAnnotatedType<T>
annotationType
- The annotation to matchCopyright © 2016. All rights reserved.