- java.lang.Object
-
- io.leangen.geantyref.AnnotatedTypeImpl
-
- io.leangen.geantyref.AnnotatedCaptureTypeImpl
-
- All Implemented Interfaces:
AnnotatedCaptureType
,java.lang.reflect.AnnotatedElement
,java.lang.reflect.AnnotatedType
class AnnotatedCaptureTypeImpl extends AnnotatedTypeImpl implements AnnotatedCaptureType
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.annotation.Annotation[]
declaredAnnotations
private java.lang.reflect.AnnotatedType[]
lowerBounds
private CaptureType
type
private java.lang.reflect.AnnotatedType[]
upperBounds
private java.lang.reflect.AnnotatedTypeVariable
variable
private java.lang.reflect.AnnotatedWildcardType
wildcard
-
Fields inherited from class io.leangen.geantyref.AnnotatedTypeImpl
annotations, ownerType
-
-
Constructor Summary
Constructors Constructor Description AnnotatedCaptureTypeImpl(CaptureType type, java.lang.reflect.AnnotatedWildcardType wildcard, java.lang.reflect.AnnotatedTypeVariable variable)
AnnotatedCaptureTypeImpl(CaptureType type, java.lang.reflect.AnnotatedWildcardType wildcard, java.lang.reflect.AnnotatedTypeVariable variable, java.lang.reflect.AnnotatedType[] upperBounds, java.lang.annotation.Annotation[] annotations)
AnnotatedCaptureTypeImpl(CaptureType type, java.lang.reflect.AnnotatedWildcardType wildcard, java.lang.reflect.AnnotatedTypeVariable variable, java.lang.reflect.AnnotatedType[] lowerBounds, java.lang.reflect.AnnotatedType[] upperBounds, java.lang.annotation.Annotation[] annotations)
AnnotatedCaptureTypeImpl(java.lang.reflect.AnnotatedWildcardType wildcard, java.lang.reflect.AnnotatedTypeVariable variable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.AnnotatedType[]
getAnnotatedLowerBounds()
Returns an array of Type objects representing the lower bound(s) of this type variable.java.lang.reflect.AnnotatedTypeVariable
getAnnotatedTypeVariable()
java.lang.reflect.AnnotatedType[]
getAnnotatedUpperBounds()
Returns an array of Type objects representing the upper bound(s) of this capture.java.lang.reflect.AnnotatedWildcardType
getAnnotatedWildcardType()
java.lang.annotation.Annotation[]
getDeclaredAnnotations()
(package private) void
init(VarMap varMap)
Initialize this CaptureTypeImpl.void
setAnnotatedUpperBounds(java.lang.reflect.AnnotatedType[] upperBounds)
(package private) AnnotatedCaptureTypeImpl
setAnnotations(java.lang.annotation.Annotation[] annotations)
-
Methods inherited from class io.leangen.geantyref.AnnotatedTypeImpl
annotationsString, equals, getAnnotatedOwnerType, getAnnotation, getAnnotations, getType, hashCode, toMap, toString, typesString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
wildcard
private final java.lang.reflect.AnnotatedWildcardType wildcard
-
variable
private final java.lang.reflect.AnnotatedTypeVariable variable
-
lowerBounds
private final java.lang.reflect.AnnotatedType[] lowerBounds
-
upperBounds
private java.lang.reflect.AnnotatedType[] upperBounds
-
type
private final CaptureType type
-
declaredAnnotations
private final java.lang.annotation.Annotation[] declaredAnnotations
-
-
Constructor Detail
-
AnnotatedCaptureTypeImpl
AnnotatedCaptureTypeImpl(java.lang.reflect.AnnotatedWildcardType wildcard, java.lang.reflect.AnnotatedTypeVariable variable)
-
AnnotatedCaptureTypeImpl
AnnotatedCaptureTypeImpl(CaptureType type, java.lang.reflect.AnnotatedWildcardType wildcard, java.lang.reflect.AnnotatedTypeVariable variable)
-
AnnotatedCaptureTypeImpl
AnnotatedCaptureTypeImpl(CaptureType type, java.lang.reflect.AnnotatedWildcardType wildcard, java.lang.reflect.AnnotatedTypeVariable variable, java.lang.reflect.AnnotatedType[] upperBounds, java.lang.annotation.Annotation[] annotations)
-
AnnotatedCaptureTypeImpl
AnnotatedCaptureTypeImpl(CaptureType type, java.lang.reflect.AnnotatedWildcardType wildcard, java.lang.reflect.AnnotatedTypeVariable variable, java.lang.reflect.AnnotatedType[] lowerBounds, java.lang.reflect.AnnotatedType[] upperBounds, java.lang.annotation.Annotation[] annotations)
-
-
Method Detail
-
init
void init(VarMap varMap)
Initialize this CaptureTypeImpl. This is needed for type variable bounds referring to each other: we need the capture of the argument.
-
setAnnotations
AnnotatedCaptureTypeImpl setAnnotations(java.lang.annotation.Annotation[] annotations)
-
getDeclaredAnnotations
public java.lang.annotation.Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
getDeclaredAnnotations
in classAnnotatedTypeImpl
-
getAnnotatedUpperBounds
public java.lang.reflect.AnnotatedType[] getAnnotatedUpperBounds()
Returns an array of Type objects representing the upper bound(s) of this capture. This includes both the upper bound of a ? extends wildcard, and the bounds declared with the type variable. References to other (or the same) type variables in bounds coming from the type variable are replaced by their matching capture.- Specified by:
getAnnotatedUpperBounds
in interfaceAnnotatedCaptureType
-
setAnnotatedUpperBounds
public void setAnnotatedUpperBounds(java.lang.reflect.AnnotatedType[] upperBounds)
- Specified by:
setAnnotatedUpperBounds
in interfaceAnnotatedCaptureType
-
getAnnotatedLowerBounds
public java.lang.reflect.AnnotatedType[] getAnnotatedLowerBounds()
Returns an array of Type objects representing the lower bound(s) of this type variable. This is the bound of a ? super wildcard. This normally contains only one or no types; it is an array for consistency withWildcardType.getLowerBounds()
.- Specified by:
getAnnotatedLowerBounds
in interfaceAnnotatedCaptureType
-
getAnnotatedTypeVariable
public java.lang.reflect.AnnotatedTypeVariable getAnnotatedTypeVariable()
- Specified by:
getAnnotatedTypeVariable
in interfaceAnnotatedCaptureType
-
getAnnotatedWildcardType
public java.lang.reflect.AnnotatedWildcardType getAnnotatedWildcardType()
- Specified by:
getAnnotatedWildcardType
in interfaceAnnotatedCaptureType
-
-