Package com.strobel.reflection
Class GenericParameter<T>
- java.lang.Object
-
- com.strobel.reflection.MemberInfo
-
- com.strobel.reflection.Type<T>
-
- com.strobel.reflection.GenericParameter<T>
-
- All Implemented Interfaces:
java.lang.reflect.AnnotatedElement
,java.lang.reflect.Type
class GenericParameter<T> extends Type<T>
-
-
Field Summary
Fields Modifier and Type Field Description private MethodInfo
_declaringMethod
private Type<?>
_declaringType
private java.lang.Class<T>
_erasedClass
private Type<?>
_lowerBound
private java.lang.String
_name
private int
_position
private java.lang.reflect.TypeVariable<?>
_typeVariable
private Type<?>
_upperBound
-
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 Modifier Constructor Description (package private)
GenericParameter(java.lang.String name, MethodInfo declaringMethod, Type<?> upperBound, int position)
protected
GenericParameter(java.lang.String name, MethodInfo declaringMethod, Type<?> upperBound, Type<?> lowerBound, int position)
(package private)
GenericParameter(java.lang.String name, Type<?> declaringType, Type<?> upperBound, int position)
protected
GenericParameter(java.lang.String name, Type<?> declaringType, Type<?> upperBound, Type<?> lowerBound, int position)
(package private)
GenericParameter(java.lang.String name, java.lang.reflect.TypeVariable<?> typeVariable, int position)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringBuilder
_appendClassName(java.lang.StringBuilder sb, boolean fullName, boolean dottedName)
<P,R>
Raccept(TypeVisitor<P,R> visitor, P parameter)
java.lang.StringBuilder
appendBriefDescription(java.lang.StringBuilder sb)
java.lang.StringBuilder
appendDescription(java.lang.StringBuilder sb)
java.lang.StringBuilder
appendErasedDescription(java.lang.StringBuilder sb)
java.lang.StringBuilder
appendErasedSignature(java.lang.StringBuilder sb)
java.lang.StringBuilder
appendSimpleDescription(java.lang.StringBuilder sb)
<A extends java.lang.annotation.Annotation>
AgetAnnotation(java.lang.Class<A> annotationClass)
java.lang.annotation.Annotation[]
getAnnotations()
java.lang.annotation.Annotation[]
getDeclaredAnnotations()
MethodInfo
getDeclaringMethod()
Type<?>
getDeclaringType()
java.lang.Class<T>
getErasedClass()
TypeList
getExplicitInterfaces()
Type<?>
getExtendsBound()
java.lang.String
getFullName()
int
getGenericParameterPosition()
javax.lang.model.type.TypeKind
getKind()
MemberType
getMemberType()
int
getModifiers()
java.lang.reflect.TypeVariable<?>
getRawTypeVariable()
Type<?>
getSuperBound()
int
hashCode()
boolean
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
boolean
isEquivalentTo(Type<?> member)
boolean
isGenericParameter()
private java.lang.Class<?>
resolveErasedClass()
private java.lang.reflect.TypeVariable<?>
resolveTypeVariable()
void
setDeclaringMethod(MethodInfo declaringMethod)
void
setDeclaringType(Type<?> declaringType)
(package private) void
setLowerBound(Type<?> lowerBound)
(package private) void
setUpperBound(Type<?> upperBound)
java.lang.String
toString()
-
Methods inherited from class com.strobel.reflection.Type
_appendClassDescription, _appendClassSignature, _appendErasedClassSignature, appendGenericSignature, appendSignature, asSuperTypeOf, bottomType, containsGenericParameter, containsGenericParameters, createArrayType, filterMethodBase, filterPreCalculate, findMembers, forName, forName, getBaseType, getCache, getClassFullName, getClassSimpleName, getConstructor, getConstructor, getConstructor, getConstructors, getConstructors, getDeclaredConstructors, getDeclaredFields, getDeclaredMethods, getDeclaredTypes, getElementType, getEnumConstants, getEnumNames, getErasedType, getField, getField, getFields, getFields, getGenericSignature, getGenericTypeDefinition, getGenericTypeParameters, getInterfaces, getInternalName, getMember, getMember, getMember, getMembers, getMembers, getMembers, getMembers, getMembers, getMembersOfType, getMethod, getMethod, getMethod, getMethods, getMethods, getMethods, getMostSpecificType, getName, getNestedType, getNestedType, getNestedTypes, getNestedTypes, getPackage, getRootElementType, getShortName, getType, getTypeArguments, getTypeBindings, getUnderlyingType, getUnderlyingTypeCore, hasElementType, hasExtendsBound, hasSuperBound, implementsInterface, invalidateCaches, isAbstract, isArray, isAssignableFrom, isBoundedType, isClass, isCompoundType, isEnum, isEquivalentTo, isGenericType, 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, 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
-
_name
private final java.lang.String _name
-
_position
private final int _position
-
_upperBound
private Type<?> _upperBound
-
_lowerBound
private Type<?> _lowerBound
-
_declaringMethod
private MethodInfo _declaringMethod
-
_declaringType
private Type<?> _declaringType
-
_erasedClass
private java.lang.Class<T> _erasedClass
-
_typeVariable
private java.lang.reflect.TypeVariable<?> _typeVariable
-
-
Constructor Detail
-
GenericParameter
GenericParameter(java.lang.String name, java.lang.reflect.TypeVariable<?> typeVariable, int position)
-
GenericParameter
GenericParameter(java.lang.String name, Type<?> declaringType, Type<?> upperBound, int position)
-
GenericParameter
GenericParameter(java.lang.String name, MethodInfo declaringMethod, Type<?> upperBound, int position)
-
GenericParameter
protected GenericParameter(java.lang.String name, Type<?> declaringType, Type<?> upperBound, Type<?> lowerBound, int position)
-
GenericParameter
protected GenericParameter(java.lang.String name, MethodInfo declaringMethod, Type<?> upperBound, Type<?> lowerBound, int position)
-
-
Method Detail
-
setUpperBound
final void setUpperBound(Type<?> upperBound)
-
setLowerBound
final void setLowerBound(Type<?> lowerBound)
-
getExplicitInterfaces
public TypeList getExplicitInterfaces()
- Overrides:
getExplicitInterfaces
in classType<T>
-
resolveTypeVariable
private java.lang.reflect.TypeVariable<?> resolveTypeVariable()
-
resolveErasedClass
private java.lang.Class<?> resolveErasedClass()
-
getRawTypeVariable
public java.lang.reflect.TypeVariable<?> getRawTypeVariable()
-
getMemberType
public MemberType getMemberType()
- Overrides:
getMemberType
in classType<T>
-
getFullName
public java.lang.String getFullName()
- Overrides:
getFullName
in classType<T>
-
appendBriefDescription
public java.lang.StringBuilder appendBriefDescription(java.lang.StringBuilder sb)
- Overrides:
appendBriefDescription
in classType<T>
-
appendSimpleDescription
public java.lang.StringBuilder appendSimpleDescription(java.lang.StringBuilder sb)
- Overrides:
appendSimpleDescription
in classType<T>
-
appendErasedDescription
public java.lang.StringBuilder appendErasedDescription(java.lang.StringBuilder sb)
- Overrides:
appendErasedDescription
in classType<T>
-
appendErasedSignature
public java.lang.StringBuilder appendErasedSignature(java.lang.StringBuilder sb)
- Overrides:
appendErasedSignature
in classType<T>
-
appendDescription
public java.lang.StringBuilder appendDescription(java.lang.StringBuilder sb)
- Overrides:
appendDescription
in classType<T>
-
_appendClassName
protected final java.lang.StringBuilder _appendClassName(java.lang.StringBuilder sb, boolean fullName, boolean dottedName)
- Overrides:
_appendClassName
in classType<T>
-
getDeclaringType
public Type<?> getDeclaringType()
- Specified by:
getDeclaringType
in classMemberInfo
-
getDeclaringMethod
public MethodInfo getDeclaringMethod()
- Overrides:
getDeclaringMethod
in classType<T>
-
setDeclaringMethod
public void setDeclaringMethod(MethodInfo declaringMethod)
-
setDeclaringType
public void setDeclaringType(Type<?> declaringType)
-
isGenericParameter
public boolean isGenericParameter()
- Overrides:
isGenericParameter
in classType<T>
-
getSuperBound
public Type<?> getSuperBound()
- Overrides:
getSuperBound
in classType<T>
-
getExtendsBound
public Type<?> getExtendsBound()
- Overrides:
getExtendsBound
in classType<T>
-
getErasedClass
public java.lang.Class<T> getErasedClass()
- Overrides:
getErasedClass
in classType<T>
-
getGenericParameterPosition
public int getGenericParameterPosition()
- Overrides:
getGenericParameterPosition
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> visitor, P parameter)
-
isEquivalentTo
public boolean isEquivalentTo(Type<?> member)
- Overrides:
isEquivalentTo
in classType<T>
-
-