com.simonstl.moe
Class Annotations

java.lang.Object
  |
  +--com.simonstl.moe.Annotations
All Implemented Interfaces:
AnnotableI, java.lang.Cloneable

public class Annotations
extends java.lang.Object
implements AnnotableI

The Annotations class implements the AnnotableI, though access to this class typically occurs through an implementation of that interface in the CoreComponent class.

All objects placed in the Annotations should implement Cloneable.

version 0.01 is the initial - bogus - release. Only the deprecated get/setType methods are available. The rest are placeholders.

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

Field Summary
protected  java.util.Map annotations
           
 
Constructor Summary
Annotations()
           
 
Method Summary
 void addAll(java.util.Map map)
           
 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 the set of annotation types.
 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.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

annotations

protected java.util.Map annotations
Constructor Detail

Annotations

public Annotations()
Method Detail

getTypes

public java.util.Set getTypes()
Returns the set of annotation types.
Specified by:
getTypes in interface AnnotableI

addAll

public void addAll(java.util.Map map)
Specified by:
addAll in interface AnnotableI

annotate

public void annotate(java.lang.Object annotationType,
                     java.lang.Object annotation)
Description copied from interface: AnnotableI
The annotate() method allows developers to add different kinds of annotation information to components.
Specified by:
annotate in interface AnnotableI

getAnnotations

public java.lang.Object getAnnotations(java.lang.Object ofAnnotationType)
Description copied from interface: AnnotableI
This method allows developers to retrieve annotations of one particular type.
Specified by:
getAnnotations in interface AnnotableI

getAllAnnotations

public java.util.Map getAllAnnotations()
Description copied from interface: AnnotableI
This method allows developers to retrieve all annotations at once.
Specified by:
getAllAnnotations in interface AnnotableI

hasAnnotation

public boolean hasAnnotation(java.lang.Object annotation)
Description copied from interface: AnnotableI
Indicates whether the provided object is stored as an annotation (of any type)
Specified by:
hasAnnotation in interface AnnotableI

hasAnnotationOfType

public boolean hasAnnotationOfType(java.lang.Object annotationType)
Description copied from interface: AnnotableI
Indicates whether there are any annotations of the given type.
Specified by:
hasAnnotationOfType in interface AnnotableI

hasAnnotations

public boolean hasAnnotations()
Specified by:
hasAnnotations in interface AnnotableI

removeAnnotation

public void removeAnnotation(java.lang.Object ofAnnotationType)
Description copied from interface: AnnotableI
This method allows developers to remove a single annotation.
Specified by:
removeAnnotation in interface AnnotableI

removeAllAnnotations

public void removeAllAnnotations()
Description copied from interface: AnnotableI
This method allows developers to remove all annotations at once.
Specified by:
removeAllAnnotations in interface AnnotableI

clone

public java.lang.Object clone()
Description copied from interface: AnnotableI
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.
Specified by:
clone in interface AnnotableI
Overrides:
clone in class java.lang.Object