Package org.jboss.jandex
Interface AnnotationTarget
-
- All Known Implementing Classes:
ClassExtendsTypeTarget
,ClassInfo
,EmptyTypeTarget
,FieldInfo
,MethodInfo
,MethodParameterInfo
,MethodParameterTypeTarget
,PositionBasedTypeTarget
,RecordComponentInfo
,ThrowsTypeTarget
,TypeParameterBoundTypeTarget
,TypeParameterTypeTarget
,TypeTarget
public interface AnnotationTarget
Represents an object that can be a target of an annotation.- See Also:
ClassInfo
,FieldInfo
,MethodInfo
,MethodParameterInfo
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AnnotationTarget.Kind
Specifies the kind of object a target represents.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClassInfo
asClass()
Casts and returns this target as aClassInfo
if it is of kindCLASS
FieldInfo
asField()
Casts and returns this target as aFieldInfo
if it is of kindFIELD
MethodInfo
asMethod()
Casts and returns this target as aMethodInfo
if it is of kindMETHOD
MethodParameterInfo
asMethodParameter()
Casts and returns this target as aMethodParameterInfo
if it is of kindMETHOD_PARAMETER
RecordComponentInfo
asRecordComponent()
Casts and returns this target as aRecordComponentInfo
if it is of kindRECORD_COMPONENT
TypeTarget
asType()
Casts and returns this target as aTypeTarget
if it is of kindTYPE
AnnotationTarget.Kind
kind()
Returns the kind of object this target represents.
-
-
-
Method Detail
-
kind
AnnotationTarget.Kind kind()
Returns the kind of object this target represents.- Returns:
- the target kind.
- Since:
- 2.0
-
asClass
ClassInfo asClass()
Casts and returns this target as aClassInfo
if it is of kindCLASS
- Returns:
- this instance cast to a class
- Since:
- 2.0
-
asField
FieldInfo asField()
Casts and returns this target as aFieldInfo
if it is of kindFIELD
- Returns:
- this instance cast to a field
- Since:
- 2.0
-
asMethod
MethodInfo asMethod()
Casts and returns this target as aMethodInfo
if it is of kindMETHOD
- Returns:
- this instance cast to a method
- Since:
- 2.0
-
asMethodParameter
MethodParameterInfo asMethodParameter()
Casts and returns this target as aMethodParameterInfo
if it is of kindMETHOD_PARAMETER
- Returns:
- this instance cast to a method parameter
- Since:
- 2.0
-
asType
TypeTarget asType()
Casts and returns this target as aTypeTarget
if it is of kindTYPE
- Returns:
- this instance cast to a type target
- Since:
- 2.0
-
asRecordComponent
RecordComponentInfo asRecordComponent()
Casts and returns this target as aRecordComponentInfo
if it is of kindRECORD_COMPONENT
- Returns:
- this instance cast to a record component
- Since:
- 2.4
-
-