Interface ClassEventListener


public interface ClassEventListener
A callback that will be notified when a class event occurs.
Since:
1.2
Author:
Jevgeni Kabanov (ekabanov@zeroturnaround.com)
  • Field Details

    • PRIORITY_DEFAULT

      static final int PRIORITY_DEFAULT
      See Also:
    • PRIORITY_WEB

      static final int PRIORITY_WEB
      See Also:
    • PRIORITY_CORE

      static final int PRIORITY_CORE
      See Also:
    • EVENT_LOADED

      static final int EVENT_LOADED
      Event that occurs right after a class has been loaded.
      See Also:
    • EVENT_RELOADED

      static final int EVENT_RELOADED
      Event that occurs right after a class has been reloaded.
      See Also:
    • EVENT_DEPENDENCY_RELOADED

      static final int EVENT_DEPENDENCY_RELOADED
      Event that occurs right after a dependency has been reloaded.
      See Also:
  • Method Details

    • onClassEvent

      default void onClassEvent(int eventType, Class<?> klass, Collection<ClassEventListener.ChangeType> changeTypes) throws Exception
      Called when a class event occurs.
      Parameters:
      eventType - the event type
      klass - the class associated with the event
      changeTypes - the class associated with the event
      Throws:
      Exception - on any issue
      See Also:
    • onClassEvent

      default void onClassEvent(int eventType, Class<?> klass) throws Exception
      Throws:
      Exception
    • priority

      default int priority()
      Returns the priority of the listener that defines the order of listener invocation. First run the listener with greatest priority value. Negative values are the latest.
      Returns:
      the priority of the listener