public class TypeParameterTypeTarget extends PositionBasedTypeTarget
Consider the following example involving a type target using the "Bar" annotation:
public <@Bar T> void foo(List<T>) { ... }
This example would be represented as a TypeParameterTypeTarget with an enclosing target
of foo's MethodInfo, and position() would return 0. The "Bar" annotation
would appear on the type variable T when invoking the typeParameters() method on
MethodInfo
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.
|
positionasClass, asClassExtends, asEmpty, asField, asMethod, asMethodParameter, asMethodParameterType, asThrows, asType, asTypeParameterBound, enclosingTarget, kind, targetpublic 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 © 2016 JBoss by Red Hat. All rights reserved.