public abstract class Annotation
extends java.util.HashMap<java.lang.String,java.lang.Object>
| Modifier and Type | Method and Description |
|---|---|
void |
attach(Annotatable ir)
Attaches a link from this annotation to the specified IR.
|
Annotation |
clone()
Returns a clone of this annotation object.
|
void |
detach()
Removes this annotation from its associated annotatable object.
|
<T> T |
get(java.lang.String key)
Returns the annotated value with the specified key.
|
Annotatable |
getAnnotatable()
Returns the annotatable object that contains this annotation.
|
static <T extends Annotation> |
hideAnnotations(Annotatable at,
java.lang.Class<T> type)
Disables printing of the specified annotation type attached at the given
annotatable object.
|
void |
setPosition(int position)
Sets the relative position from the associated IR with the given position.
|
void |
setSkipPrint(boolean skip_print)
Sets the skip_print field.
|
abstract java.lang.String |
toString()
Returns a string representation of the annotation.
|
java.lang.String |
toString(int position)
Returns the string representation of this annotation if the given
position is equal to the position of this annotation.
|
public <T> T get(java.lang.String key)
key - the given string key.public void setPosition(int position)
position - the new position.public abstract java.lang.String toString()
toString in class java.util.AbstractMap<java.lang.String,java.lang.Object>public java.lang.String toString(int position)
public Annotation clone()
clone in class java.util.HashMap<java.lang.String,java.lang.Object>public void attach(Annotatable ir)
ir - the associated Cetus IR.public void detach()
public void setSkipPrint(boolean skip_print)
public Annotatable getAnnotatable()
public static <T extends Annotation> void hideAnnotations(Annotatable at, java.lang.Class<T> type)
at - the annotatable object of interest (statement or declaration).type - the annotation type to be hidden.