org.objectweb.kilim.model.services
Class Annotations

java.lang.Object
  extended byorg.objectweb.kilim.model.services.Annotations
Direct Known Subclasses:
KilimConfiguration

public class Annotations
extends java.lang.Object

Thids class is a simple container for annotations (i.e. a couple made of a name and a value).

Author:
horn

Field Summary
private  java.util.HashMap externalServices
           
 
Constructor Summary
Annotations()
           
 
Method Summary
 void addAnnotation(java.lang.String aName, java.lang.Object xService)
          adds a new annotation
 java.lang.Object getAnnotation(java.lang.String aName)
          returns an annotation.
 java.util.Iterator getAnnotationNames()
          returns an iterator containing the names of all the currently added annotations.
 void removeAnnotation(java.lang.String aName)
          removes an annotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

externalServices

private java.util.HashMap externalServices
Constructor Detail

Annotations

public Annotations()
See Also:
Object.Object()
Method Detail

addAnnotation

public void addAnnotation(java.lang.String aName,
                          java.lang.Object xService)
                   throws KilimException
adds a new annotation

Parameters:
aName - : the name of the annotation to be added.
xService - : the reference of the object offering the annotation
Throws:
KilimException - : the exception is generated if the name or the reference is null or if the annotation has already been added (It should be removed first).

removeAnnotation

public void removeAnnotation(java.lang.String aName)
                      throws KilimException
removes an annotation

Parameters:
aName - : the name of the annotation to be removed.
Throws:
KilimException - : the exception is generated if the name is null or if the annotation name is unknown.

getAnnotation

public java.lang.Object getAnnotation(java.lang.String aName)
                               throws KilimException
returns an annotation.

Parameters:
aName - : the name of the annotation to be returned.
Returns:
Object : the reference of the object offering the annotation.
Throws:
KilimException - : the exception is generated if the name is null.

getAnnotationNames

public java.util.Iterator getAnnotationNames()
returns an iterator containing the names of all the currently added annotations.

Returns:
Iterator