Package pascal.taie.language.annotation
Interface Annotated
- All Known Implementing Classes:
ClassMember
,JClass
,JField
,JMethod
public interface Annotated
Represents objects that can be attached annotations.
Currently, only JClass
, JMethod
, and JField
implements this interface. Besides, annotations on parameters
are supported, and they are stored in JMethod
instead of
parameters in IR.
TODO: let other program elements (e.g., Var
implements
this interface.
-
Method Summary
Modifier and TypeMethodDescriptiongetAnnotation
(String annotationType) boolean
hasAnnotation
(String annotationType)
-
Method Details
-
hasAnnotation
- Returns:
true
if this annotated object has an annotation ofannotationType
.
-
getAnnotation
- Returns:
- the
Annotation
of typeannotationType
if it is present in this annotated; otherwise,null
is returned.
-
getAnnotations
Collection<Annotation> getAnnotations()- Returns:
- all annotations in this annotated object.
-