Package com.nomagic.uml2.ext.jmi.reflect
Class AbstractRepository.CandidatesForDisposeEventSupport
- java.lang.Object
-
- com.nomagic.uml2.ext.jmi.reflect.AbstractRepository.CandidatesForDisposeEventSupport
-
- All Implemented Interfaces:
AbstractRepository.CandidatesForDisposeListener
- Enclosing class:
- AbstractRepository
private static class AbstractRepository.CandidatesForDisposeEventSupport extends java.lang.Object implements AbstractRepository.CandidatesForDisposeListener
Support that delivers candidates to remove events to the listeners
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interface
AbstractRepository.CandidatesForDisposeEventSupport.ListenerRunnable
-
Field Summary
Fields Modifier and Type Field Description protected java.util.concurrent.CopyOnWriteArrayList<AbstractRepository.CandidatesForDisposeListener>
listeners
-
Constructor Summary
Constructors Modifier Constructor Description private
CandidatesForDisposeEventSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(AbstractRepository.CandidatesForDisposeListener listener)
Removes the listenervoid
candidateAdded(javax.jmi.reflect.RefObject candidate)
Invoked when an object is registered as candidate to be disposedvoid
candidateRemoved(javax.jmi.reflect.RefObject candidate)
Invoked when an object is removed from candidates to be disposedprivate void
invokeForAllListeners(AbstractRepository.CandidatesForDisposeEventSupport.ListenerRunnable run)
void
removeListener(AbstractRepository.CandidatesForDisposeListener listener)
Adds listener
-
-
-
Field Detail
-
listeners
protected final java.util.concurrent.CopyOnWriteArrayList<AbstractRepository.CandidatesForDisposeListener> listeners
-
-
Method Detail
-
candidateAdded
public void candidateAdded(javax.jmi.reflect.RefObject candidate)
Description copied from interface:AbstractRepository.CandidatesForDisposeListener
Invoked when an object is registered as candidate to be disposed- Specified by:
candidateAdded
in interfaceAbstractRepository.CandidatesForDisposeListener
- Parameters:
candidate
- the object
-
removeListener
public void removeListener(AbstractRepository.CandidatesForDisposeListener listener)
Adds listener- Parameters:
listener
- the listener to add
-
addListener
public void addListener(AbstractRepository.CandidatesForDisposeListener listener)
Removes the listener- Parameters:
listener
- the listener to remove
-
candidateRemoved
public void candidateRemoved(javax.jmi.reflect.RefObject candidate)
Description copied from interface:AbstractRepository.CandidatesForDisposeListener
Invoked when an object is removed from candidates to be disposed- Specified by:
candidateRemoved
in interfaceAbstractRepository.CandidatesForDisposeListener
- Parameters:
candidate
- the object
-
invokeForAllListeners
private void invokeForAllListeners(AbstractRepository.CandidatesForDisposeEventSupport.ListenerRunnable run)
-
-