public class Annotations extends Attribute
Modifier and Type | Method and Description |
---|---|
void |
acceptVisit(BCVisitor visit)
Accept a visit from a
BCVisitor , calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one. |
Annotation |
addAnnotation(Annotation an)
Import an annotation from another instance.
|
Annotation |
addAnnotation(BCClass type)
Add a new annotation.
|
Annotation |
addAnnotation(Class type)
Add a new annotation.
|
Annotation |
addAnnotation(String type)
Add a new annotation.
|
void |
clear()
Remove all annotations.
|
Annotation |
getAnnotation(BCClass type)
Return the annotation of the given type, or null if none.
|
Annotation |
getAnnotation(Class type)
Return the annotation of the given type, or null if none.
|
Annotation |
getAnnotation(String type)
Return the annotation of the given type, or null if none.
|
Annotation[] |
getAnnotations()
All declared annotations.
|
boolean |
isRuntime()
Whether these annotations are runtime-visible.
|
boolean |
removeAnnotation(Annotation anno)
Remove the given annotation.
|
boolean |
removeAnnotation(BCClass type)
Remove the annotation of the given type.
|
boolean |
removeAnnotation(Class type)
Remove the annotation of the given type.
|
boolean |
removeAnnotation(String type)
Remove the annotation of the given type.
|
void |
setAnnotations(Annotation[] annos)
Set the annotations.
|
getClassLoader, getName, getNameIndex, getOwner, getPool, getProject, isValid
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributes
public boolean isRuntime()
public Annotation[] getAnnotations()
public void setAnnotations(Annotation[] annos)
public Annotation getAnnotation(Class type)
public Annotation getAnnotation(BCClass type)
public Annotation getAnnotation(String type)
public Annotation addAnnotation(Annotation an)
public Annotation addAnnotation(Class type)
public Annotation addAnnotation(BCClass type)
public Annotation addAnnotation(String type)
public void clear()
public boolean removeAnnotation(Annotation anno)
public boolean removeAnnotation(Class type)
public boolean removeAnnotation(BCClass type)
public boolean removeAnnotation(String type)
public void acceptVisit(BCVisitor visit)
VisitAcceptor
BCVisitor
, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one.Copyright © 2002–2019. All rights reserved.