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 AnnotationTargetRepresents 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 classAnnotationTarget.KindSpecifies the kind of object a target represents.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClassInfoasClass()Casts and returns this target as aClassInfoif it is of kindCLASSFieldInfoasField()Casts and returns this target as aFieldInfoif it is of kindFIELDMethodInfoasMethod()Casts and returns this target as aMethodInfoif it is of kindMETHODMethodParameterInfoasMethodParameter()Casts and returns this target as aMethodParameterInfoif it is of kindMETHOD_PARAMETERRecordComponentInfoasRecordComponent()Casts and returns this target as aRecordComponentInfoif it is of kindRECORD_COMPONENTTypeTargetasType()Casts and returns this target as aTypeTargetif it is of kindTYPEAnnotationTarget.Kindkind()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 aClassInfoif it is of kindCLASS- Returns:
- this instance cast to a class
- Since:
- 2.0
-
asField
FieldInfo asField()
Casts and returns this target as aFieldInfoif it is of kindFIELD- Returns:
- this instance cast to a field
- Since:
- 2.0
-
asMethod
MethodInfo asMethod()
Casts and returns this target as aMethodInfoif it is of kindMETHOD- Returns:
- this instance cast to a method
- Since:
- 2.0
-
asMethodParameter
MethodParameterInfo asMethodParameter()
Casts and returns this target as aMethodParameterInfoif 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 aTypeTargetif it is of kindTYPE- Returns:
- this instance cast to a type target
- Since:
- 2.0
-
asRecordComponent
RecordComponentInfo asRecordComponent()
Casts and returns this target as aRecordComponentInfoif it is of kindRECORD_COMPONENT- Returns:
- this instance cast to a record component
- Since:
- 2.4
-
-