Package com.pnfsoftware.jeb.util.events
Interface IEventSource
- All Known Subinterfaces:
IAddressableUnit,IApkUnit,IArchiveUnit,IArtifact,IBinaryUnit,ICertificateUnit,ICodeObjectUnit,ICodeUnit,ICoreContext,ICudaFatbinUnit,IDalvikDebuggerUnit,IDartAotUnit,IDebuggerUnit,IDecompilerUnit,IDexDecompilerUnit,IDexDisassemblyDocument,IDexUnit,IDuplicatedUnit,IELFUnit,IEnginesContext,IInteractiveUnit,IJavaSourceUnit,IJsonUnit,INativeCodeUnit<InsnType>,INativeDebuggerUnit,INativeDecompilerUnit<InsnType>,INativeDisassemblyDocument,INativeSourceUnit,IPECOFFUnit,IPropertyManager,IRuntimeProject,IS7Unit,ISourceUnit,ITableDocument,ITextDocument,ITreeDocument,IUnit,IUnitCreator,IXApkUnit,IXmlUnit
- All Known Implementing Classes:
AbstractBinaryUnit,AbstractClientContext,AbstractCodeObjectUnit,AbstractCodeUnit,AbstractContext,AbstractInteractiveBinaryUnit,AbstractInteractiveUnit,AbstractTableDocument,AbstractTextDocument,AbstractTextPartAsDocumentProxy,AbstractTreeDocument,AbstractUnit,Artifact,AsciiDocument,BinaryWrapperUnit,CDocument,CodeDocument,ContainerUnit,DataContainerUnit,EventSource,FileContainerUnit,HeadlessClientContext,HexDumpDocument,InteractiveWrapperUnit,ItemHistory,JavaDocument,JebEventSource,LazyDataContainerUnit,PropertyManager,SimplePropertyManager,StaticTableDocument,StaticTextDocument,StaticTreeDocument,UnknownBinaryUnit,WrapperUnit
public interface IEventSource
Interface for objects generating events, with optional relaying to a parent source.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(IEventListener listener) Register a listener.intGet the numbers of objects listening to this event source.List<? extends IEventListener>Get a copy of the list of listeners.Get the parent source.voidinsertListener(int index, IEventListener listener) Register a listener.voidNotify listeners that an event has occurred.voidremoveListener(IEventListener listener) Unregister a listener.voidsetParentSource(IEventSource parentSource) Set a parent source.
-
Method Details
-
setParentSource
Set a parent source.- Parameters:
parentSource- the optional parent source
-
getParentSource
IEventSource getParentSource()Get the parent source.- Returns:
- the parent source, or null if none
-
countListeners
int countListeners()Get the numbers of objects listening to this event source.- Returns:
- the number of listeners
-
getListeners
List<? extends IEventListener> getListeners()Get a copy of the list of listeners.- Returns:
-
addListener
Register a listener. The listener is appended to the existing list of listeners. The implementor may allow duplicates.- Parameters:
listener- a listener of events generated by this source
-
insertListener
Register a listener. The implementor may allow duplicates.- Parameters:
index- insertion pointlistener- a listener of events generated by this source
-
removeListener
Unregister a listener. If the implementor allows duplicates in addListener(), it should deal with those consistently.- Parameters:
listener- the listener to be removed
-
notifyListeners
Notify listeners that an event has occurred.- Parameters:
e- the event to be propagated
-