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 Multimap<Class<? extends Annotation>,EnhancedAnnotatedMethod<?,? super T>> |
buildAnnotatedMethodMultimap(Set<EnhancedAnnotatedMethod<?,? super T>> effectiveMethods) |
protected 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<AnnotatedConstructor<T>> |
getConstructors()
Get the constructors of the type.
|
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<AnnotatedField<? super T>> |
getFields()
Get the fields of the type.
|
Set<AnnotatedMethod<? super T>> |
getMethods()
Get the methods of the type.
|
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, isPrimitiveclone, finalize, getClass, notify, notifyAll, wait, wait, waitisParameterizedTypegetActualTypeArguments, getBindingsAsArray, getInterfaceClosure, getJavaClass, getMetaAnnotations, getQualifiers, isPrimitivegetJavaClassgetAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresentprotected 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 Multimap<Class<? extends Annotation>,EnhancedAnnotatedMethod<?,? super T>> buildAnnotatedMethodMultimap(Set<EnhancedAnnotatedMethod<?,? super T>> effectiveMethods)
protected 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()
EnhancedAnnotatedTypegetDeclaredEnhancedFields in interface EnhancedAnnotatedType<T>public <F> EnhancedAnnotatedField<F,?> getDeclaredEnhancedField(String fieldName)
EnhancedAnnotatedTypegetDeclaredEnhancedField in interface EnhancedAnnotatedType<T>F - the expected type of the fieldfieldName - the field namepublic Collection<EnhancedAnnotatedField<?,? super T>> getDeclaredEnhancedFields(Class<? extends Annotation> annotationType)
EnhancedAnnotatedTypegetDeclaredEnhancedFields in interface EnhancedAnnotatedType<T>annotationType - The annotation to matchpublic EnhancedAnnotatedConstructor<T> getDeclaredEnhancedConstructor(ConstructorSignature signature)
EnhancedAnnotatedTypegetDeclaredEnhancedConstructor 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)
EnhancedAnnotatedTypegetDeclaredEnhancedMethods in interface EnhancedAnnotatedType<T>annotationType - The annotation to matchpublic Collection<EnhancedAnnotatedConstructor<T>> getEnhancedConstructors()
EnhancedAnnotatedTypegetEnhancedConstructors 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()
EnhancedAnnotatedTypegetNoArgsEnhancedConstructor in interface EnhancedAnnotatedType<T>public Collection<EnhancedAnnotatedMethod<?,? super T>> getDeclaredEnhancedMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
EnhancedAnnotatedTypegetDeclaredEnhancedMethodsWithAnnotatedParameters in interface EnhancedAnnotatedType<T>annotationType - The annotation to matchpublic EnhancedAnnotatedMethod<?,?> getEnhancedMethod(Method methodDescriptor)
EnhancedAnnotatedTypegetEnhancedMethod in interface EnhancedAnnotatedType<T>public Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethods()
EnhancedAnnotatedTypeEnhancedAnnotated.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()
EnhancedAnnotatedTypegetDeclaredEnhancedMethods in interface EnhancedAnnotatedType<T>public <M> EnhancedAnnotatedMethod<M,?> getDeclaredEnhancedMethod(MethodSignature signature)
EnhancedAnnotatedTypegetDeclaredEnhancedMethod in interface EnhancedAnnotatedType<T>M - the expected return typesignature - the name of the methodpublic <M> EnhancedAnnotatedMethod<M,?> getEnhancedMethod(MethodSignature signature)
EnhancedAnnotatedTypegetEnhancedMethod 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()
EnhancedAnnotatedisPublic 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)
EnhancedAnnotatedTypeisEquivalent 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<AnnotatedConstructor<T>> getConstructors()
AnnotatedTypeGet the constructors of the type. If an empty set is returned, a default constructor with no parameters will be assumed.
getConstructors in interface AnnotatedType<T>public Set<AnnotatedField<? super T>> getFields()
AnnotatedTypeGet the fields of the type.
getFields in interface AnnotatedType<T>public Set<AnnotatedMethod<? super T>> getMethods()
AnnotatedTypeGet the methods of the type.
getMethods in interface AnnotatedType<T>public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
EnhancedAnnotatedTypegetDeclaredMetaAnnotations in interface EnhancedAnnotatedType<T>public boolean isDiscovered()
isDiscovered in interface EnhancedAnnotatedType<T>public SlimAnnotatedType<T> slim()
EnhancedAnnotatedTypeAnnotatedType with minimal memory footprint.slim in interface EnhancedAnnotated<T,Class<T>>slim in interface EnhancedAnnotatedType<T>AnnotatedTypepublic Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
EnhancedAnnotatedTypeEnhancedAnnotated.getJavaClass(). Overridden methods are not returned.getEnhancedMethodsWithAnnotatedParameters in interface EnhancedAnnotatedType<T>annotationType - The annotation to matchCopyright © 2014. All Rights Reserved.