|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.okapi.common.annotation.Annotations
public class Annotations
Provides annotation mechanism to the resources.
| Constructor Summary | |
|---|---|
Annotations()
Creates a new Annotations object. |
|
| Method Summary | ||
|---|---|---|
void |
clear()
Removes all the annotations in this object. |
|
Annotations |
clone()
|
|
|
get(java.lang.Class<A> annotationType)
Gets the annotation for a given type. |
|
java.util.Iterator<IAnnotation> |
iterator()
|
|
|
remove(java.lang.Class<A> annotationType)
Removes the annotation of a given type. |
|
|
set(T annotation)
Sets an annotation. |
|
protected void |
setAnnotations(java.util.concurrent.ConcurrentHashMap<java.lang.Class<? extends IAnnotation>,IAnnotation> annotations)
Used by clone method to copy over all annotations at once. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Annotations()
| Method Detail |
|---|
public <T extends IAnnotation> void set(T annotation)
annotation - The annotation object to set.public <A extends IAnnotation> A get(java.lang.Class<A> annotationType)
annotationType - Type of the annotation to retrieve.
public void clear()
public <A extends IAnnotation> A remove(java.lang.Class<A> annotationType)
annotationType - Type of the annotation to remove.
public Annotations clone()
clone in class java.lang.Objectprotected void setAnnotations(java.util.concurrent.ConcurrentHashMap<java.lang.Class<? extends IAnnotation>,IAnnotation> annotations)
annotations - public java.util.Iterator<IAnnotation> iterator()
iterator in interface java.lang.Iterable<IAnnotation>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||