public class TypeParameterBoundTypeTarget extends TypeParameterTypeTarget
Consider the following example involving a type target using the "Bar" annotation:
public <T extends Number & @Bar Serializable> void foo(List<T>) { ... }
This example would be represented as a TypeParameterBoundTypeTarget
with
an enclosing target of foo's MethodInfo
, a position()
value of "0"
and a boundPosition()
value of "1". The "Bar" annotation would appear on the
type "Serializable" in the bound list of T, on the first type parameter.
TypeTarget.Usage
AnnotationTarget.Kind
Modifier and Type | Method and Description |
---|---|
TypeParameterBoundTypeTarget |
asTypeParameterBound()
Casts and returns this type target as a
TypeParameterBoundTypeTarget . |
int |
boundPosition()
Returns the index of the bound this type annotation is within.
|
TypeTarget.Usage |
usage()
Returns the kind of usage of this type target.
|
asTypeParameter
position
asClass, asClassExtends, asEmpty, asField, asMethod, asMethodParameter, asMethodParameterType, asThrows, asType, enclosingTarget, kind, target
public final int boundPosition()
public final TypeTarget.Usage usage()
TypeTarget
getClass()
comparisons.usage
in class TypeParameterTypeTarget
public TypeParameterBoundTypeTarget asTypeParameterBound()
TypeTarget
TypeParameterBoundTypeTarget
. If this type target
is not a TypeParameterBoundTypeTarget
, then an exception will be thrown.asTypeParameterBound
in class TypeTarget
TypeParameterBoundTypeTarget
Copyright © 2018 JBoss by Red Hat. All rights reserved.