-
- All Implemented Interfaces:
-
dev.thecodewarrior.mirror.type.TypeMirror,dev.thecodewarrior.mirror.util.DeclarationMirror
public interface TypeVariableMirror implements TypeMirror, DeclarationMirror
The type of mirror used to represent type variables.
Note: Type variables' bounds will never be specialized, as doing so would require a significant increase in complexity in order to avoid infinite recursion and/or deadlocks. However, should a pressing enough need come up in the future to outweigh this increase in complexity, it is likely possible it could be added.
-
-
Method Summary
Modifier and Type Method Description abstract TypeVariableMirrorwithTypeAnnotations(List<Annotation> annotations)Creates a copy of this type mirror that has been specialized to have the passed Type Annotations. abstract TypeVariable<?>getCoreType()The Java Core Reflection type this mirror represents abstract AnnotatedTypeVariablegetCoreAnnotatedType()The Java Core Reflection annotated type this mirror represents. abstract TypeVariableMirrorgetRaw()The mirror representing this type without any generic specialization abstract List<TypeMirror>getBounds()The bounds of this type variable. abstract Class<?>getErasure()The JVM erasure of this type. abstract AnnotationListgetTypeAnnotations()The type annotations present on this type. -
Methods inherited from class dev.thecodewarrior.mirror.type.TypeVariableMirror
asArrayMirror, asClassMirror, isAssignableFrom, toDeclarationString, toJavaDeclarationString, toJavaString, toKotlinDeclarationString, toKotlinString, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
withTypeAnnotations
abstract TypeVariableMirror withTypeAnnotations(List<Annotation> annotations)
Creates a copy of this type mirror that has been specialized to have the passed Type Annotations. Type annotations on this mirror will not carry over to the resulting mirror.
Note that are not the annotations present on the class declaration, they are the annotations present on the use of the type.
-
getCoreType
abstract TypeVariable<?> getCoreType()
The Java Core Reflection type this mirror represents
-
getCoreAnnotatedType
abstract AnnotatedTypeVariable getCoreAnnotatedType()
The Java Core Reflection annotated type this mirror represents.
!!NOTE!! The JVM implementations of
AnnotatedTypedon't implementequalsorhashCode, so they will equal neither each other nor this. If you need these methods pass any annotated type through Mirror.toCanonical.
-
getRaw
abstract TypeVariableMirror getRaw()
The mirror representing this type without any generic specialization
-
getBounds
abstract List<TypeMirror> getBounds()
The bounds of this type variable. Types specializing this type variable must extend all of these.
By default it contains the Object mirror.
-
getErasure
abstract Class<?> getErasure()
The JVM erasure of this type.
-
getTypeAnnotations
abstract AnnotationList getTypeAnnotations()
The type annotations present on this type. These are not the annotations present on the declaration, they are the annotations present on the use of the type.
-
-
-
-