public abstract class AbstractAnnotation extends java.lang.Object implements Annotation, java.lang.Cloneable, java.io.Serializable
Annotation
interface, containing a
mechanism for registering change listeners.Modifier | Constructor and Description |
---|---|
protected |
AbstractAnnotation()
Constructs an annotation.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(AnnotationChangeListener listener)
Registers an object to receive notification of changes to the
annotation.
|
java.lang.Object |
clone()
Returns a clone of the annotation.
|
protected void |
fireAnnotationChanged()
Notifies all registered listeners that the annotation has changed.
|
boolean |
getNotify()
Returns a flag that indicates whether listeners should be
notified about changes to the annotation.
|
boolean |
hasListener(java.util.EventListener listener)
Returns
true if the specified object is registered with
the annotation as a listener. |
protected void |
notifyListeners(AnnotationChangeEvent event)
Notifies all registered listeners that the annotation has changed.
|
void |
removeChangeListener(AnnotationChangeListener listener)
Deregisters an object so that it no longer receives notification of
changes to the annotation.
|
void |
setNotify(boolean flag)
Sets a flag that indicates whether listeners should be notified about
changes of an annotation.
|
protected AbstractAnnotation()
public void addChangeListener(AnnotationChangeListener listener)
addChangeListener
in interface Annotation
listener
- the object to register.removeChangeListener(AnnotationChangeListener)
public void removeChangeListener(AnnotationChangeListener listener)
removeChangeListener
in interface Annotation
listener
- the object to deregister.addChangeListener(AnnotationChangeListener)
public boolean hasListener(java.util.EventListener listener)
true
if the specified object is registered with
the annotation as a listener. Most applications won't need to call this
method, it exists mainly for use by unit testing code.listener
- the listener.addChangeListener(AnnotationChangeListener)
,
removeChangeListener(AnnotationChangeListener)
protected void fireAnnotationChanged()
protected void notifyListeners(AnnotationChangeEvent event)
event
- contains information about the event that triggered the
notification.addChangeListener(AnnotationChangeListener)
,
removeChangeListener(AnnotationChangeListener)
public boolean getNotify()
setNotify(boolean)
public void setNotify(boolean flag)
flag
- the flaggetNotify()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
AnnotationChangeListener
references that have been
registered with this annotation.clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the annotation does not support
cloning.