extends or implements clause
of an enclosing class. This class conveys the enclosing class definition, as well as a position to indicate
the interface or superclass this target applies to. Since type targets can appear at any depth of the type tree
at this location, the corresponding type reference is also included.
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 be represented as a ClassExtendsTypeTarget with an enclosing target
of the ClassInfo of Foo, and position() would be 0.
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ClassExtendsTypeTarget | asClassExtends()
Overrides org. ClassExtendsTypeTarget.
|
| public ClassInfo | enclosingTarget()
Overrides org. target() method.
|
| public final TypeTarget. | usage()
Implements abstract org. |
| ClassExtendsTypeTarget | back to summary |
|---|---|
| pack-priv ClassExtendsTypeTarget(ClassInfo enclosingTarget, int position) | |
| ClassExtendsTypeTarget | back to summary |
|---|---|
| public ClassExtendsTypeTarget(AnnotationTarget enclosingTarget, Type target, int position) | |
| asClassExtends | back to summary |
|---|---|
| public ClassExtendsTypeTarget asClassExtends() Overrides org. Doc from org. Casts and returns this type target as a
| |
| enclosingTarget | back to summary |
|---|---|
| public ClassInfo enclosingTarget() Overrides org. Doc from org. Returns the enclosing target that contains the type referred to by the | |
| usage | back to summary |
|---|---|
| public final TypeTarget. Implements abstract org. Doc from org. Returns the kind of usage of this type target. This allows a caller to use a switch statement
as opposed to
| |