Package org.zeroturnaround.javarebel
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)
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intEvent that occurs right after a dependency has been reloaded.static final intEvent that occurs right after a class has been loaded.static final intEvent that occurs right after a class has been reloaded.static final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptiondefault voidonClassEvent(int eventType, Class<?> klass) default voidonClassEvent(int eventType, Class<?> klass, Collection<ClassEventListener.ChangeType> changeTypes) Called when a class event occurs.default intpriority()Returns the priority of the listener that defines the order of listener invocation.
-
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_LOADEDEvent that occurs right after a class has been loaded.- See Also:
-
EVENT_RELOADED
static final int EVENT_RELOADEDEvent that occurs right after a class has been reloaded.- See Also:
-
EVENT_DEPENDENCY_RELOADED
static final int EVENT_DEPENDENCY_RELOADEDEvent 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 typeklass- the class associated with the eventchangeTypes- the class associated with the event- Throws:
Exception- on any issue- See Also:
-
onClassEvent
- 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
-