ides.api.core
Interface Annotable

All Known Subinterfaces:
DESElement, DESEvent, DESModel, FSAModel, FSAState, FSASupervisor, FSATransition, ParentModel, SupervisoryEvent, SupervisoryEventSet

public interface Annotable

Interface for objects which can be dynamically annotated by other parts of the code. The intended use is mainly to allow plugins to annotate models and their elemets.

Author:
Lenko Grigorov

Method Summary
 java.lang.Object getAnnotation(java.lang.String key)
          Returns the annotation for the given key.
 boolean hasAnnotation(java.lang.String key)
          Returns true if there is an annotation for the given key.
 void removeAnnotation(java.lang.String key)
          Removes the annotation for the given key.
 void setAnnotation(java.lang.String key, java.lang.Object annotation)
          Sets an annotation for a given key.
 

Method Detail

getAnnotation

java.lang.Object getAnnotation(java.lang.String key)
Returns the annotation for the given key.

Parameters:
key - key for the annotation
Returns:
if there is no annotation for the given key, returns null, otherwise returns the annotation for the key

setAnnotation

void setAnnotation(java.lang.String key,
                   java.lang.Object annotation)
Sets an annotation for a given key. If there is already an annotation for the key, it is replaced.

Parameters:
key - the key for the annotation
annotation - the annotation

removeAnnotation

void removeAnnotation(java.lang.String key)
Removes the annotation for the given key.

Parameters:
key - key for the annotation

hasAnnotation

boolean hasAnnotation(java.lang.String key)
Returns true if there is an annotation for the given key. Otherwise returns false.

Parameters:
key - key for the annotation
Returns:
true if there is an annotation for the given key, false otherwise