com.simonstl.moe
Interface AnnotableI

All Superinterfaces:
java.lang.Cloneable
All Known Subinterfaces:
CoreComponentI, MutableComponentI
All Known Implementing Classes:
Annotations, CoreComponent

public interface AnnotableI
extends java.lang.Cloneable

The AnnotableI interface defines how MOE objects can be annotated with type or other information.

version 0.01 is the initial release.

Version:
0.01 24 August 2001
Author:
Simon St.Laurent

Method Summary
 void addAll(java.util.Map mapOfAnnotations)
           
 void annotate(java.lang.Object annotationType, java.lang.Object annotation)
          The annotate() method allows developers to add different kinds of annotation information to components.
 java.lang.Object clone()
          The clone() method will make a deep copy when its contents implement Cloneable.
 java.util.Map getAllAnnotations()
          This method allows developers to retrieve all annotations at once.
 java.lang.Object getAnnotations(java.lang.Object ofAnnotationType)
          This method allows developers to retrieve annotations of one particular type.
 java.util.Set getTypes()
          Returns a Set containing the types of all annotations stored in this object
 boolean hasAnnotation(java.lang.Object annotation)
          Indicates whether the provided object is stored as an annotation (of any type)
 boolean hasAnnotationOfType(java.lang.Object annotationType)
          Indicates whether there are any annotations of the given type.
 boolean hasAnnotations()
           
 void removeAllAnnotations()
          This method allows developers to remove all annotations at once.
 void removeAnnotation(java.lang.Object ofAnnotationType)
          This method allows developers to remove a single annotation.
 

Method Detail

addAll

public void addAll(java.util.Map mapOfAnnotations)

annotate

public void annotate(java.lang.Object annotationType,
                     java.lang.Object annotation)
The annotate() method allows developers to add different kinds of annotation information to components.

getAnnotations

public java.lang.Object getAnnotations(java.lang.Object ofAnnotationType)
This method allows developers to retrieve annotations of one particular type.

getAllAnnotations

public java.util.Map getAllAnnotations()
This method allows developers to retrieve all annotations at once.

getTypes

public java.util.Set getTypes()
Returns a Set containing the types of all annotations stored in this object

hasAnnotation

public boolean hasAnnotation(java.lang.Object annotation)
Indicates whether the provided object is stored as an annotation (of any type)

hasAnnotationOfType

public boolean hasAnnotationOfType(java.lang.Object annotationType)
Indicates whether there are any annotations of the given type.

hasAnnotations

public boolean hasAnnotations()

removeAnnotation

public void removeAnnotation(java.lang.Object ofAnnotationType)
This method allows developers to remove a single annotation.

removeAllAnnotations

public void removeAllAnnotations()
This method allows developers to remove all annotations at once.

clone

public java.lang.Object clone()
The clone() method will make a deep copy when its contents implement Cloneable. Content which is not Cloneable will be copies by reference. Use this flexibility cautiously.
Overrides:
clone in class java.lang.Object