Package com.strobel.reflection
Class GenericType<T>
- java.lang.Object
-
- com.strobel.reflection.MemberInfo
-
- com.strobel.reflection.Type<T>
-
- com.strobel.reflection.GenericType<T>
-
- All Implemented Interfaces:
java.lang.reflect.AnnotatedElement
,java.lang.reflect.Type
final class GenericType<T> extends Type<T>
-
-
Field Summary
Fields Modifier and Type Field Description private Type<?>
_baseType
private ConstructorList
_constructors
private FieldList
_fields
private Type<?>
_genericTypeDefinition
private TypeList
_interfaces
private MethodList
_methods
private TypeList
_nestedTypes
private TypeBindings
_typeBindings
(package private) static TypeBinder
GenericBinder
-
Fields inherited from class com.strobel.reflection.Type
Bottom, CACHE, CACHE_LOCK, DefaultBinder, DefaultLookup, Delimiter, EmptyConstructors, EmptyFields, EmptyMembers, EmptyMethods, EmptyObjects, EmptyStrings, EmptyTypes, FilterMethodOverride, FilterName, FilterNameIgnoreCase, FilterRawMember, NullType, PRIMITIVE_TYPES, RESOLVER, TYPE_BINDER, Value
-
Fields inherited from class com.strobel.reflection.MemberInfo
EMPTY_ANNOTATIONS, ENUM_MODIFIER, VARARGS_MODIFIER
-
-
Constructor Summary
Constructors Constructor Description GenericType(Type<?> genericTypeDefinition, Type<?>... typeArguments)
GenericType(Type<?> genericTypeDefinition, TypeBindings typeBindings)
GenericType(Type<?> genericTypeDefinition, TypeList typeArguments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <P,R>
Raccept(TypeVisitor<P,R> typeVisitor, P parameter)
private void
ensureBaseType()
private void
ensureConstructors()
private void
ensureFields()
private void
ensureInterfaces()
private void
ensureMethods()
private void
ensureNestedTypes()
<A extends java.lang.annotation.Annotation>
AgetAnnotation(java.lang.Class<A> annotationClass)
java.lang.annotation.Annotation[]
getAnnotations()
Type<? super T>
getBaseType()
java.lang.annotation.Annotation[]
getDeclaredAnnotations()
protected ConstructorList
getDeclaredConstructors()
protected FieldList
getDeclaredFields()
protected MethodList
getDeclaredMethods()
protected TypeList
getDeclaredTypes()
Type<?>
getDeclaringType()
java.lang.Class<T>
getErasedClass()
TypeList
getExplicitInterfaces()
Type<?>
getGenericTypeDefinition()
MemberType
getMemberType()
int
getModifiers()
TypeBindings
getTypeBindings()
boolean
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
boolean
isGenericType()
-
Methods inherited from class com.strobel.reflection.Type
_appendClassDescription, _appendClassName, _appendClassSignature, _appendErasedClassSignature, appendBriefDescription, appendDescription, appendErasedDescription, appendErasedSignature, appendGenericSignature, appendSignature, appendSimpleDescription, asSuperTypeOf, bottomType, containsGenericParameter, containsGenericParameters, createArrayType, filterMethodBase, filterPreCalculate, findMembers, forName, forName, getCache, getClassFullName, getClassSimpleName, getConstructor, getConstructor, getConstructor, getConstructors, getConstructors, getDeclaringMethod, getElementType, getEnumConstants, getEnumNames, getErasedType, getExtendsBound, getField, getField, getFields, getFields, getFullName, getGenericParameterPosition, getGenericSignature, getGenericTypeParameters, getInterfaces, getInternalName, getKind, getMember, getMember, getMember, getMembers, getMembers, getMembers, getMembers, getMembers, getMembersOfType, getMethod, getMethod, getMethod, getMethods, getMethods, getMethods, getMostSpecificType, getName, getNestedType, getNestedType, getNestedTypes, getNestedTypes, getPackage, getRootElementType, getShortName, getSuperBound, getType, getTypeArguments, getUnderlyingType, getUnderlyingTypeCore, hasElementType, hasExtendsBound, hashCode, hasSuperBound, implementsInterface, invalidateCaches, isAbstract, isArray, isAssignableFrom, isBoundedType, isClass, isCompoundType, isEnum, isEquivalentTo, isEquivalentTo, isGenericParameter, isGenericTypeDefinition, isInstance, isInterface, isLocalClass, isNested, isPrimitive, isRawType, isSubTypeOf, isSynthetic, isUnbounded, isVisible, isWildcardType, list, list, list, makeArrayType, makeArrayType, makeCompoundType, makeCompoundType, makeExtendsWildcard, makeGenericType, makeGenericType, makeGenericTypeCore, makeSuperWildcard, makeWildcard, newInstance, nullType, of, of, substitute, toString, tryFind, unboundedWildcard
-
Methods inherited from class com.strobel.reflection.MemberInfo
emptyAnnotations, equals, getAnnotationsByType, getBriefDescription, getDeclaredAnnotation, getDeclaredAnnotationsByType, getDescription, getErasedDescription, getErasedSignature, getReflectedType, getSignature, getSimpleDescription, isFinal, isNonPublic, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
-
-
-
Field Detail
-
GenericBinder
static final TypeBinder GenericBinder
-
_genericTypeDefinition
private final Type<?> _genericTypeDefinition
-
_typeBindings
private final TypeBindings _typeBindings
-
_interfaces
private TypeList _interfaces
-
_baseType
private Type<?> _baseType
-
_fields
private FieldList _fields
-
_constructors
private ConstructorList _constructors
-
_methods
private MethodList _methods
-
_nestedTypes
private TypeList _nestedTypes
-
-
Method Detail
-
ensureBaseType
private void ensureBaseType()
-
ensureInterfaces
private void ensureInterfaces()
-
ensureFields
private void ensureFields()
-
ensureConstructors
private void ensureConstructors()
-
ensureMethods
private void ensureMethods()
-
ensureNestedTypes
private void ensureNestedTypes()
-
getErasedClass
public java.lang.Class<T> getErasedClass()
- Overrides:
getErasedClass
in classType<T>
-
getExplicitInterfaces
public TypeList getExplicitInterfaces()
- Overrides:
getExplicitInterfaces
in classType<T>
-
getBaseType
public Type<? super T> getBaseType()
- Overrides:
getBaseType
in classType<T>
-
getGenericTypeDefinition
public Type<?> getGenericTypeDefinition()
- Overrides:
getGenericTypeDefinition
in classType<T>
-
getMemberType
public MemberType getMemberType()
- Overrides:
getMemberType
in classType<T>
-
getDeclaringType
public Type<?> getDeclaringType()
- Specified by:
getDeclaringType
in classMemberInfo
-
isGenericType
public boolean isGenericType()
- Overrides:
isGenericType
in classType<T>
-
getTypeBindings
public TypeBindings getTypeBindings()
- Overrides:
getTypeBindings
in classType<T>
-
getModifiers
public int getModifiers()
- Specified by:
getModifiers
in classMemberInfo
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
- Specified by:
isAnnotationPresent
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
isAnnotationPresent
in classType<T>
-
getAnnotation
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationClass)
- Specified by:
getAnnotation
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
getAnnotation
in classType<T>
-
getAnnotations
@NotNull public java.lang.annotation.Annotation[] getAnnotations()
- Specified by:
getAnnotations
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
getAnnotations
in classType<T>
-
getDeclaredAnnotations
@NotNull public java.lang.annotation.Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
getDeclaredAnnotations
in classType<T>
-
accept
public <P,R> R accept(TypeVisitor<P,R> typeVisitor, P parameter)
-
getDeclaredConstructors
protected ConstructorList getDeclaredConstructors()
- Overrides:
getDeclaredConstructors
in classType<T>
-
getDeclaredMethods
protected MethodList getDeclaredMethods()
- Overrides:
getDeclaredMethods
in classType<T>
-
getDeclaredFields
protected FieldList getDeclaredFields()
- Overrides:
getDeclaredFields
in classType<T>
-
getDeclaredTypes
protected TypeList getDeclaredTypes()
- Overrides:
getDeclaredTypes
in classType<T>
-
-