Interface IEventSource

All Known Subinterfaces:
IAddressableUnit, IApkUnit, IArchiveUnit, IArtifact, IBinaryUnit, ICertificateUnit, ICodeObjectUnit, ICodeUnit, ICoreContext, 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 Details

    • setParentSource

      void setParentSource(IEventSource parentSource)
      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

      void addListener(IEventListener listener)
      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

      void insertListener(int index, IEventListener listener)
      Register a listener. The implementor may allow duplicates.
      Parameters:
      index - insertion point
      listener - a listener of events generated by this source
    • removeListener

      void removeListener(IEventListener listener)
      Unregister a listener. If the implementor allows duplicates in addListener(), it should deal with those consistently.
      Parameters:
      listener - the listener to be removed
    • notifyListeners

      void notifyListeners(IEvent e)
      Notify listeners that an event has occurred.
      Parameters:
      e - the event to be propagated