public class TypeParameterTypeTarget extends PositionBasedTypeTarget
Consider the following example involving a type target using the Bar annotation:
public <@Bar T> void foo(List<T> l) { ... }
This example would be represented as a TypeParameterTypeTarget with an enclosing target
of the MethodInfo of foo, and position() would be 0.
TypeTarget.UsageAnnotationTarget.Kind| Modifier and Type | Method and Description |
|---|---|
TypeParameterTypeTarget |
asTypeParameter()
Casts and returns this type target as a
TypeParameterTypeTarget. |
TypeTarget.Usage |
usage()
Returns the kind of usage of this type target.
|
positionannotation, annotations, annotations, annotationsWithRepeatable, asClass, asClassExtends, asEmpty, asField, asMethod, asMethodParameter, asMethodParameterType, asRecordComponent, asThrows, asType, asTypeParameterBound, declaredAnnotation, declaredAnnotations, declaredAnnotationsWithRepeatable, enclosingTarget, hasAnnotation, hasDeclaredAnnotation, kind, targetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitannotation, annotation, annotations, annotations, annotationsWithRepeatable, annotationsWithRepeatable, declaredAnnotation, declaredAnnotation, declaredAnnotationsWithRepeatable, declaredAnnotationsWithRepeatable, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotationpublic TypeTarget.Usage usage()
TypeTargetgetClass() comparisons.usage in class TypeTargetpublic TypeParameterTypeTarget asTypeParameter()
TypeTargetTypeParameterTypeTarget. If this type target
is not a TypeParameterTypeTarget, then an exception will be thrown.asTypeParameter in class TypeTargetTypeParameterTypeTargetCopyright © 2018–2022. All rights reserved.