It is expected that callers will traverse the full tree from the specified starting point, since this context is important in interpreting the meaning of the type annotation
org.jboss.jandex.EmptyTypeTarget , org.jboss.jandex.ClassExtendsTypeTarget , org.jboss.jandex.MethodParameterTypeTarget , org.jboss.jandex.TypeParameterTypeTarget , org.jboss.jandex.TypeParameterBoundTypeTarget , org.jboss.jandex.ThrowsTypeTarget
| Modifier and Type | Class and Description |
|---|---|
| public static enum | TypeTarget.Usage
Specifies a form of usage of a type annotation |
| Modifier and Type | Field and Description |
|---|---|
| private final AnnotationTarget | |
| private Type |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public AnnotationInstance | Returns: the annotation instance, ornull if not foundname of the annotation type to look for, must not be name)nullImplements org. |
| public List | Returns: immutable list of annotation instances, nevernullname of the annotation type, must not be name)nullImplements org. |
| public List | Returns: immutable list of annotation instances, nevernullImplements org. |
| public List | Returns: immutable list of annotation instances, nevernullname of the annotation type, must not be name, IndexView nullindex used to obtain the annotation type, must not be index)nullImplements org. |
| public final ClassInfo | asClass()
Implements org. ClassInfo if it is of kind CLASS
|
| public ClassExtendsTypeTarget | Returns: an instance ofClassExtendsTypeTargetCasts and returns this type target as a |
| public Declaration | asDeclaration()
Implements org. Declaration if it is a declaration.
|
| public EmptyTypeTarget | |
| public final FieldInfo | asField()
Implements org. FieldInfo if it is of kind FIELD
|
| public final MethodInfo | asMethod()
Implements org. MethodInfo if it is of kind METHOD
|
| public final MethodParameterInfo | asMethodParameter()
Implements org. MethodParameterInfo if it is of kind METHOD_PARAMETER
|
| public MethodParameterTypeTarget | Returns: an instance ofMethodParameterTypeTargetCasts and returns this type target as a |
| public final RecordComponentInfo | asRecordComponent()
Implements org. RecordComponentInfo if it is of kind RECORD_COMPONENT
|
| public ThrowsTypeTarget | Returns: an instance ofThrowsTypeTargetCasts and returns this type target as a |
| public final TypeTarget | asType()
Implements org. TypeTarget if it is of kind TYPE
|
| public TypeParameterTypeTarget | Returns: an instance ofTypeParameterTypeTargetCasts and returns this type target as a |
| public TypeParameterBoundTypeTarget | Returns: an instance ofTypeParameterBoundTypeTargetCasts and returns this type target as a |
| public AnnotationInstance | Returns: the annotation instance, ornull if not foundname of the annotation type to look for, must not be name)nullImplements org. |
| public List | Returns: immutable list of annotation instances, nevernullImplements org. |
| public List | Returns: immutable list of annotation instances, nevernullname of the annotation type, must not be name, IndexView nullindex used to obtain the annotation type, must not be index)nullImplements org. |
| public AnnotationTarget | Returns: the enclosing targetReturns the enclosing target that contains the type referred to by the |
| public boolean | Returns: true if the annotation is present, false otherwisename of the annotation type to look for, must not be name)nullImplements org. |
| public boolean | Returns: true if the annotation is present, false otherwisename of the annotation type to look for, must not be name)nullImplements org. |
| public boolean | isDeclaration()
Implements org. |
| public final AnnotationTarget. | kind()
Implements org. |
| pack-priv void | |
| public Type | Returns: the type containing the respective annotationReturns the type which contains the respective annotation. |
| public abstract TypeTarget. |
| enclosingTarget | back to summary |
|---|---|
| private final AnnotationTarget enclosingTarget | |
| target | back to summary |
|---|---|
| private Type target | |
| TypeTarget | back to summary |
|---|---|
| pack-priv TypeTarget(AnnotationTarget enclosingTarget, Type target) | |
| TypeTarget | back to summary |
|---|---|
| pack-priv TypeTarget(AnnotationTarget enclosingTarget) | |
| annotation | back to summary |
|---|---|
| public AnnotationInstance annotation(DotName name) Implements org. Returns the annotation instance with given name declared on this type usage.
Note that unlike other
| |
| annotations | back to summary |
|---|---|
| public List Implements org. Returns the annotation instances with given name declared on this type usage.
Note that unlike other
| |
| annotations | back to summary |
|---|---|
| public List Implements org. Returns the annotation instances declared on this type usage.
Note that unlike other
| |
| annotationsWithRepeatable | back to summary |
|---|---|
| public List Implements org. Returns the annotation instances with given name declared on this type usage.
If the specified annotation is repeatable, the result also contains all values from the container annotation
instance. In this case, the
Note that unlike other
| |
| asClass | back to summary |
|---|---|
| public final ClassInfo asClass() Implements org. Doc from org. Casts and returns this target as a | |
| asClassExtends | back to summary |
|---|---|
| public ClassExtendsTypeTarget asClassExtends() Casts and returns this type target as a
| |
| asDeclaration | back to summary |
|---|---|
| public Declaration asDeclaration() Implements org. Doc from org. Casts and returns this annotation target as a
| |
| asEmpty | back to summary |
|---|---|
| public EmptyTypeTarget asEmpty() | |
| asField | back to summary |
|---|---|
| public final FieldInfo asField() Implements org. Doc from org. Casts and returns this target as a | |
| asMethod | back to summary |
|---|---|
| public final MethodInfo asMethod() Implements org. Doc from org. Casts and returns this target as a
| |
| asMethodParameter | back to summary |
|---|---|
| public final MethodParameterInfo asMethodParameter() Implements org. Doc from org. Casts and returns this target as a
| |
| asMethodParameterType | back to summary |
|---|---|
| public MethodParameterTypeTarget asMethodParameterType() Casts and returns this type target as a
| |
| asRecordComponent | back to summary |
|---|---|
| public final RecordComponentInfo asRecordComponent() Implements org. Doc from org. Casts and returns this target as a
| |
| asThrows | back to summary |
|---|---|
| public ThrowsTypeTarget asThrows() Casts and returns this type target as a
| |
| asType | back to summary |
|---|---|
| public final TypeTarget asType() Implements org. Doc from org. Casts and returns this target as a
| |
| asTypeParameter | back to summary |
|---|---|
| public TypeParameterTypeTarget asTypeParameter() Casts and returns this type target as a
| |
| asTypeParameterBound | back to summary |
|---|---|
| public TypeParameterBoundTypeTarget asTypeParameterBound() Casts and returns this type target as a
| |
| declaredAnnotation | back to summary |
|---|---|
| public AnnotationInstance declaredAnnotation(DotName name) Implements org. Returns the annotation instance with given name declared on this type usage.
| |
| declaredAnnotations | back to summary |
|---|---|
| public List Implements org. Returns the annotation instances declared on this type usage.
| |
| declaredAnnotationsWithRepeatable | back to summary |
|---|---|
| public List Implements org. Returns the annotation instances with given name declared on this type usage.
If the specified annotation is repeatable, the result also contains all values from the container annotation
instance. In this case, the
| |
| enclosingTarget | back to summary |
|---|---|
| public AnnotationTarget enclosingTarget() Returns the enclosing target that contains the type referred to by the
| |
| hasAnnotation | back to summary |
|---|---|
| public boolean hasAnnotation(DotName name) Implements org. Returns whether an annotation instance with given name is declared on this type usage.
Note that unlike other
| |
| hasDeclaredAnnotation | back to summary |
|---|---|
| public boolean hasDeclaredAnnotation(DotName name) Implements org. Returns whether an annotation instance with given name is declared on this type usage.
| |
| isDeclaration | back to summary |
|---|---|
| public boolean isDeclaration() Implements org. Doc from org. Returns whether this annotation target is a declaration.
| |
| kind | back to summary |
|---|---|
| public final AnnotationTarget. Implements org. Doc from org. Returns the kind of object this target represents.
| |
| setTarget | back to summary |
|---|---|
| pack-priv void setTarget(Type target) | |
| target | back to summary |
|---|---|
| public Type target() Returns the type which contains the respective annotation. In some cases this may be null (e.g. in the case of a bridge method, which erases type information so there is no target to map to)
| |
| usage | back to summary |
|---|---|
| public abstract TypeTarget. Returns the kind of usage of this type target. This allows a caller to use a switch statement
as opposed to
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final TypeTarget. | CLASS_EXTENDS
Indicates a type annotation occurs within class' |
| public static final TypeTarget. | EMPTY
Indicates a type annotation occurs within a field, method receiver, or method return type |
| public static final TypeTarget. | METHOD_PARAMETER
Indicates a type annotation occurs within a method parameter |
| public static final TypeTarget. | THROWS
Indicates a type annotation occurs within the |
| public static final TypeTarget. | TYPE_PARAMETER
Indicates a type annotation occurs within a method or class type parameter |
| public static final TypeTarget. | TYPE_PARAMETER_BOUND
Indicates a type annotation occurs within the bound of a method or class type parameter |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static TypeTarget. | |
| public static TypeTarget. |
| CLASS_EXTENDS | back to summary |
|---|---|
| public static final TypeTarget. Indicates a type annotation occurs within class' | |
| EMPTY | back to summary |
|---|---|
| public static final TypeTarget. Indicates a type annotation occurs within a field, method receiver, or method return type | |
| METHOD_PARAMETER | back to summary |
|---|---|
| public static final TypeTarget. Indicates a type annotation occurs within a method parameter | |
| THROWS | back to summary |
|---|---|
| public static final TypeTarget. Indicates a type annotation occurs within the | |
| TYPE_PARAMETER | back to summary |
|---|---|
| public static final TypeTarget. Indicates a type annotation occurs within a method or class type parameter | |
| TYPE_PARAMETER_BOUND | back to summary |
|---|---|
| public static final TypeTarget. Indicates a type annotation occurs within the bound of a method or class type parameter | |
| Usage | back to summary |
|---|---|
| private Usage() | |
| valueOf | back to summary |
|---|---|
| public static TypeTarget. | |
| values | back to summary |
|---|---|
| public static TypeTarget. | |