T - the type of the classpublic class EnhancedAnnotatedTypeImpl<T> extends AbstractEnhancedAnnotated<T,java.lang.Class<T>> implements EnhancedAnnotatedType<T>
MAPPED_DECLARED_METAANNOTATIONS, MAPPED_METAANNOTATIONS| Modifier | Constructor and Description |
|---|---|
protected |
EnhancedAnnotatedTypeImpl(SlimAnnotatedType<T> annotatedType,
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> annotationMap,
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> declaredAnnotationMap,
ClassTransformer classTransformer) |
| Modifier and Type | Method and Description |
|---|---|
<U> EnhancedAnnotatedType<? extends U> |
asEnhancedSubclass(EnhancedAnnotatedType<U> clazz) |
protected Multimap<java.lang.Class<? extends java.lang.annotation.Annotation>,EnhancedAnnotatedMethod<?,? super T>> |
buildAnnotatedMethodMultimap(java.util.Set<EnhancedAnnotatedMethod<?,? super T>> effectiveMethods) |
protected Multimap<java.lang.Class<? extends java.lang.annotation.Annotation>,EnhancedAnnotatedMethod<?,? super T>> |
buildAnnotatedParameterMethodMultimap(java.util.Set<EnhancedAnnotatedMethod<?,? super T>> effectiveMethods) |
<S> S |
cast(java.lang.Object object) |
boolean |
equals(java.lang.Object obj) |
java.lang.Class<? extends T> |
getAnnotatedClass()
Gets the implementing class
|
java.util.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(java.lang.String fieldName)
Get a field by name
|
java.util.Collection<EnhancedAnnotatedField<?,? super T>> |
getDeclaredEnhancedFields()
Gets all fields declared on this class only.
|
java.util.Collection<EnhancedAnnotatedField<?,? super T>> |
getDeclaredEnhancedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets all fields which are annotated with the given annotation type on this
class only.
|
EnhancedAnnotatedMethod<?,?> |
getDeclaredEnhancedMethod(java.lang.reflect.Method method) |
<M> EnhancedAnnotatedMethod<M,?> |
getDeclaredEnhancedMethod(MethodSignature signature)
Get a method by name
|
java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> |
getDeclaredEnhancedMethods()
Gets all methods on the type
|
java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> |
getDeclaredEnhancedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets all methods annotated with annotationType
|
java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> |
getDeclaredEnhancedMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets declared with parameters annotated with annotationType
|
java.util.Set<java.lang.annotation.Annotation> |
getDeclaredMetaAnnotations(java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationType)
Gets all annotations which are declared on this annotated item with the
given meta annotation type
|
java.lang.Class<T> |
getDelegate()
Gets the delegate (class)
|
java.util.Collection<EnhancedAnnotatedConstructor<T>> |
getEnhancedConstructors()
Gets all constructors
|
java.util.Collection<EnhancedAnnotatedConstructor<T>> |
getEnhancedConstructors(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets constructors with given annotation type
|
java.util.Collection<EnhancedAnnotatedField<?,? super T>> |
getEnhancedFields()
Gets the abstracted fields of the class
Initializes the fields if they are null
|
java.util.Collection<EnhancedAnnotatedField<?,?>> |
getEnhancedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets the abstracted field annotated with a specific annotation type
If the fields map is null, initialize it first
|
EnhancedAnnotatedMethod<?,?> |
getEnhancedMethod(java.lang.reflect.Method methodDescriptor)
Find the annotated method for a given methodDescriptor
|
<M> EnhancedAnnotatedMethod<M,?> |
getEnhancedMethod(MethodSignature signature)
Get a method by name
|
java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> |
getEnhancedMethods()
Gets all methods on the type including those declared on a superclass of
EnhancedAnnotated.getJavaClass(). |
java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> |
getEnhancedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets the abstracted methods that have a certain annotation type present
If the annotated methods map is null, initialize it first
|
java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> |
getEnhancedMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.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
|
java.util.Set<AnnotatedField<? super T>> |
getFields()
Get the fields of the type.
|
java.util.Set<AnnotatedMethod<? super T>> |
getMethods()
Get the methods of the type.
|
java.lang.String |
getName()
Gets the name of the type
|
EnhancedAnnotatedConstructor<T> |
getNoArgsEnhancedConstructor()
Gets the no-args constructor
|
protected java.util.Set<EnhancedAnnotatedMethod<?,? super T>> |
getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType,
java.util.Set<EnhancedAnnotatedMethod<?,? super T>> methods) |
protected java.util.Set<EnhancedAnnotatedMethod<?,? super T>> |
getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType,
java.util.Set<EnhancedAnnotatedMethod<?,? super T>> methods,
boolean skipOverridingBridgeMethods) |
java.lang.Package |
getPackage() |
java.lang.String |
getSimpleName() |
int |
hashCode() |
boolean |
isAbstract() |
boolean |
isAnonymousClass() |
boolean |
isDiscovered() |
boolean |
isEnum() |
boolean |
isEquivalent(java.lang.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. |
java.lang.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, java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> annotationMap, java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> declaredAnnotationMap, ClassTransformer classTransformer)
public static <T> EnhancedAnnotatedType<T> of(SlimAnnotatedType<T> annotatedType, ClassTransformer classTransformer)
protected java.util.Set<EnhancedAnnotatedMethod<?,? super T>> getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType, java.util.Set<EnhancedAnnotatedMethod<?,? super T>> methods)
protected java.util.Set<EnhancedAnnotatedMethod<?,? super T>> getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType, java.util.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<java.lang.Class<? extends java.lang.annotation.Annotation>,EnhancedAnnotatedMethod<?,? super T>> buildAnnotatedMethodMultimap(java.util.Set<EnhancedAnnotatedMethod<?,? super T>> effectiveMethods)
protected Multimap<java.lang.Class<? extends java.lang.annotation.Annotation>,EnhancedAnnotatedMethod<?,? super T>> buildAnnotatedParameterMethodMultimap(java.util.Set<EnhancedAnnotatedMethod<?,? super T>> effectiveMethods)
public java.lang.Class<? extends T> getAnnotatedClass()
public java.lang.Class<T> getDelegate()
getDelegate in class AbstractEnhancedAnnotated<T,java.lang.Class<T>>public java.util.Collection<EnhancedAnnotatedField<?,? super T>> getEnhancedFields()
getEnhancedFields in interface EnhancedAnnotatedType<T>public java.util.Collection<EnhancedAnnotatedField<?,? super T>> getDeclaredEnhancedFields()
EnhancedAnnotatedTypegetDeclaredEnhancedFields in interface EnhancedAnnotatedType<T>public <F> EnhancedAnnotatedField<F,?> getDeclaredEnhancedField(java.lang.String fieldName)
EnhancedAnnotatedTypegetDeclaredEnhancedField in interface EnhancedAnnotatedType<T>F - the expected type of the fieldfieldName - the field namepublic java.util.Collection<EnhancedAnnotatedField<?,? super T>> getDeclaredEnhancedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
EnhancedAnnotatedTypegetDeclaredEnhancedFields in interface EnhancedAnnotatedType<T>annotationType - The annotation to matchpublic EnhancedAnnotatedConstructor<T> getDeclaredEnhancedConstructor(ConstructorSignature signature)
EnhancedAnnotatedTypegetDeclaredEnhancedConstructor in interface EnhancedAnnotatedType<T>public java.util.Collection<EnhancedAnnotatedField<?,?>> getEnhancedFields(java.lang.Class<? extends java.lang.annotation.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 java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
getEnhancedMethods in interface EnhancedAnnotatedType<T>annotationType - The annotation type to matchEnhancedAnnotatedType.getEnhancedMethods(Class)public java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> getDeclaredEnhancedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
EnhancedAnnotatedTypegetDeclaredEnhancedMethods in interface EnhancedAnnotatedType<T>annotationType - The annotation to matchpublic java.util.Collection<EnhancedAnnotatedConstructor<T>> getEnhancedConstructors()
EnhancedAnnotatedTypegetEnhancedConstructors in interface EnhancedAnnotatedType<T>public java.util.Collection<EnhancedAnnotatedConstructor<T>> getEnhancedConstructors(java.lang.Class<? extends java.lang.annotation.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 java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> getDeclaredEnhancedMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
EnhancedAnnotatedTypegetDeclaredEnhancedMethodsWithAnnotatedParameters in interface EnhancedAnnotatedType<T>annotationType - The annotation to matchpublic EnhancedAnnotatedMethod<?,?> getEnhancedMethod(java.lang.reflect.Method methodDescriptor)
EnhancedAnnotatedTypegetEnhancedMethod in interface EnhancedAnnotatedType<T>public java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethods()
EnhancedAnnotatedTypeEnhancedAnnotated.getJavaClass(). Overridden methods are not returned.getEnhancedMethods in interface EnhancedAnnotatedType<T>public EnhancedAnnotatedMethod<?,?> getDeclaredEnhancedMethod(java.lang.reflect.Method method)
getDeclaredEnhancedMethod in interface EnhancedAnnotatedType<T>public java.util.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 java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getSimpleName()
getSimpleName in interface EnhancedAnnotatedType<T>public boolean isStatic()
isStatic in interface EnhancedAnnotated<T,java.lang.Class<T>>EnhancedAnnotated.isStatic()public boolean isFinal()
isFinal in interface EnhancedAnnotated<T,java.lang.Class<T>>EnhancedAnnotated.isFinal()public boolean isPublic()
EnhancedAnnotatedisPublic in interface EnhancedAnnotated<T,java.lang.Class<T>>public boolean isGeneric()
isGeneric in interface EnhancedAnnotated<T,java.lang.Class<T>>public java.lang.String getName()
getName in interface EnhancedAnnotated<T,java.lang.Class<T>>EnhancedAnnotated.getName()public EnhancedAnnotatedType<? super T> getEnhancedSuperclass()
getEnhancedSuperclass in interface EnhancedAnnotatedType<T>public boolean isEquivalent(java.lang.Class<?> clazz)
EnhancedAnnotatedTypeisEquivalent in interface EnhancedAnnotatedType<T>clazz - The Java classpublic boolean isPrivate()
isPrivate in interface EnhancedAnnotated<T,java.lang.Class<T>>public boolean isPackagePrivate()
isPackagePrivate in interface EnhancedAnnotated<T,java.lang.Class<T>>public java.lang.Package getPackage()
getPackage in interface EnhancedAnnotated<T,java.lang.Class<T>>public <U> EnhancedAnnotatedType<? extends U> asEnhancedSubclass(EnhancedAnnotatedType<U> clazz)
asEnhancedSubclass in interface EnhancedAnnotatedType<T>public <S> S cast(java.lang.Object object)
cast in interface EnhancedAnnotatedType<T>public java.util.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 java.util.Set<AnnotatedField<? super T>> getFields()
AnnotatedTypeGet the fields of the type.
getFields in interface AnnotatedType<T>public java.util.Set<AnnotatedMethod<? super T>> getMethods()
AnnotatedTypeGet the methods of the type.
getMethods in interface AnnotatedType<T>public java.util.Set<java.lang.annotation.Annotation> getDeclaredMetaAnnotations(java.lang.Class<? extends java.lang.annotation.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,java.lang.Class<T>>slim in interface EnhancedAnnotatedType<T>AnnotatedTypepublic java.util.Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
EnhancedAnnotatedTypeEnhancedAnnotated.getJavaClass(). Overridden methods are not returned.getEnhancedMethodsWithAnnotatedParameters in interface EnhancedAnnotatedType<T>annotationType - The annotation to matchpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2015. All Rights Reserved.