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_declaringMethodprivate Type<?>_declaringTypeprivate java.lang.Class<T>_erasedClassprivate Type<?>_lowerBoundprivate java.lang.String_nameprivate int_positionprivate java.lang.reflect.TypeVariable<?>_typeVariableprivate 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)protectedGenericParameter(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)protectedGenericParameter(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.StringBuilderappendBriefDescription(java.lang.StringBuilder sb)java.lang.StringBuilderappendDescription(java.lang.StringBuilder sb)java.lang.StringBuilderappendErasedDescription(java.lang.StringBuilder sb)java.lang.StringBuilderappendErasedSignature(java.lang.StringBuilder sb)java.lang.StringBuilderappendSimpleDescription(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()MethodInfogetDeclaringMethod()Type<?>getDeclaringType()java.lang.Class<T>getErasedClass()TypeListgetExplicitInterfaces()Type<?>getExtendsBound()java.lang.StringgetFullName()intgetGenericParameterPosition()javax.lang.model.type.TypeKindgetKind()MemberTypegetMemberType()intgetModifiers()java.lang.reflect.TypeVariable<?>getRawTypeVariable()Type<?>getSuperBound()inthashCode()booleanisAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)booleanisEquivalentTo(Type<?> member)booleanisGenericParameter()private java.lang.Class<?>resolveErasedClass()private java.lang.reflect.TypeVariable<?>resolveTypeVariable()voidsetDeclaringMethod(MethodInfo declaringMethod)voidsetDeclaringType(Type<?> declaringType)(package private) voidsetLowerBound(Type<?> lowerBound)(package private) voidsetUpperBound(Type<?> upperBound)java.lang.StringtoString()-
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:
getExplicitInterfacesin 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:
getMemberTypein classType<T>
-
getFullName
public java.lang.String getFullName()
- Overrides:
getFullNamein classType<T>
-
appendBriefDescription
public java.lang.StringBuilder appendBriefDescription(java.lang.StringBuilder sb)
- Overrides:
appendBriefDescriptionin classType<T>
-
appendSimpleDescription
public java.lang.StringBuilder appendSimpleDescription(java.lang.StringBuilder sb)
- Overrides:
appendSimpleDescriptionin classType<T>
-
appendErasedDescription
public java.lang.StringBuilder appendErasedDescription(java.lang.StringBuilder sb)
- Overrides:
appendErasedDescriptionin classType<T>
-
appendErasedSignature
public java.lang.StringBuilder appendErasedSignature(java.lang.StringBuilder sb)
- Overrides:
appendErasedSignaturein classType<T>
-
appendDescription
public java.lang.StringBuilder appendDescription(java.lang.StringBuilder sb)
- Overrides:
appendDescriptionin classType<T>
-
_appendClassName
protected final java.lang.StringBuilder _appendClassName(java.lang.StringBuilder sb, boolean fullName, boolean dottedName)- Overrides:
_appendClassNamein classType<T>
-
getDeclaringType
public Type<?> getDeclaringType()
- Specified by:
getDeclaringTypein classMemberInfo
-
getDeclaringMethod
public MethodInfo getDeclaringMethod()
- Overrides:
getDeclaringMethodin classType<T>
-
setDeclaringMethod
public void setDeclaringMethod(MethodInfo declaringMethod)
-
setDeclaringType
public void setDeclaringType(Type<?> declaringType)
-
isGenericParameter
public boolean isGenericParameter()
- Overrides:
isGenericParameterin classType<T>
-
getSuperBound
public Type<?> getSuperBound()
- Overrides:
getSuperBoundin classType<T>
-
getExtendsBound
public Type<?> getExtendsBound()
- Overrides:
getExtendsBoundin classType<T>
-
getErasedClass
public java.lang.Class<T> getErasedClass()
- Overrides:
getErasedClassin classType<T>
-
getGenericParameterPosition
public int getGenericParameterPosition()
- Overrides:
getGenericParameterPositionin classType<T>
-
getModifiers
public int getModifiers()
- Specified by:
getModifiersin classMemberInfo
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
- Specified by:
isAnnotationPresentin interfacejava.lang.reflect.AnnotatedElement- Overrides:
isAnnotationPresentin classType<T>
-
getAnnotation
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationClass)
- Specified by:
getAnnotationin interfacejava.lang.reflect.AnnotatedElement- Overrides:
getAnnotationin classType<T>
-
getAnnotations
@NotNull public java.lang.annotation.Annotation[] getAnnotations()
- Specified by:
getAnnotationsin interfacejava.lang.reflect.AnnotatedElement- Overrides:
getAnnotationsin classType<T>
-
getDeclaredAnnotations
@NotNull public java.lang.annotation.Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotationsin interfacejava.lang.reflect.AnnotatedElement- Overrides:
getDeclaredAnnotationsin classType<T>
-
accept
public <P,R> R accept(TypeVisitor<P,R> visitor, P parameter)
-
isEquivalentTo
public boolean isEquivalentTo(Type<?> member)
- Overrides:
isEquivalentToin classType<T>
-
-