public class ClassExtendsTypeTarget extends PositionBasedTypeTarget
The special position 65535 is used to indicate the type usage is on the super type in the extends clause. All other numbers denote the zero-based offset in the interface list of the implements clause.
Consider the following example involving a type target using the "Bar" annotation:
class Foo<T> implements List<@Bar T> {}
This example would return a position of 1 (marking the first interface), an enclosing target of the
ClassInfo representing "Foo", and a target type of the type variable "T".TypeTarget.UsageAnnotationTarget.Kind| Constructor and Description |
|---|
ClassExtendsTypeTarget(AnnotationTarget enclosingTarget,
Type target,
int position) |
| Modifier and Type | Method and Description |
|---|---|
ClassExtendsTypeTarget |
asClassExtends()
Casts and returns this type target as a
ClassExtendsTypeTarget. |
ClassInfo |
enclosingTarget()
Returns the enclosing target that contains the type referred to by the
TypeTarget.target() method. |
TypeTarget.Usage |
usage()
Returns the kind of usage of this type target.
|
positionasClass, asEmpty, asField, asMethod, asMethodParameter, asMethodParameterType, asThrows, asType, asTypeParameter, asTypeParameterBound, kind, targetpublic ClassExtendsTypeTarget(AnnotationTarget enclosingTarget, Type target, int position)
public final TypeTarget.Usage usage()
TypeTargetgetClass() comparisons.usage in class TypeTargetpublic ClassInfo enclosingTarget()
TypeTargetTypeTarget.target() method.enclosingTarget in class TypeTargetpublic ClassExtendsTypeTarget asClassExtends()
TypeTargetClassExtendsTypeTarget. If this type target
is not a ClassExtendsTypeTarget, then an exception will be thrown.asClassExtends in class TypeTargetClassExtendsTypeTargetCopyright © 2022 JBoss by Red Hat. All rights reserved.