Interface IDexAnnotationItem
public interface IDexAnnotationItem
This interface represents annotation items. An annotation item is made of an annotation and
visibility information attached to the annotation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Visibility constant for build-level annotations.static final int
Visibility constant for runtime-level annotations.static final int
Visibility constant for system-level annotations. -
Method Summary
Modifier and TypeMethodDescriptionFormat the annotation visibility into a human-readable string.Get the annotation.int
Get the visibility for the annotation.default boolean
Convenience method.
-
Field Details
-
VISIBILITY_BUILD
static final int VISIBILITY_BUILDVisibility constant for build-level annotations.- See Also:
-
VISIBILITY_RUNTIME
static final int VISIBILITY_RUNTIMEVisibility constant for runtime-level annotations.- See Also:
-
VISIBILITY_SYSTEM
static final int VISIBILITY_SYSTEMVisibility constant for system-level annotations.- See Also:
-
-
Method Details
-
getVisibility
int getVisibility()Get the visibility for the annotation.- Returns:
- the visibility value, refer to the
VISIBILITY_*
constants
-
formatVisibility
String formatVisibility()Format the annotation visibility into a human-readable string.- Returns:
-
isSystemLevelAnnotation
default boolean isSystemLevelAnnotation()Convenience method.- Returns:
- true if the visibility of this annotation is 2
-
getAnnotation
IDexAnnotation getAnnotation()Get the annotation.- Returns:
- the annotation, or null on error
-