Class HotSwapClassesRedefinitionsWatcherDefault
java.lang.Object
org.spincast.plugins.hotswap.classeswatcher.HotSwapClassesRedefinitionsWatcherDefault
- All Implemented Interfaces:
HotSwapClassesRedefinitionsWatcher
@Plugin(name="HotSwapClassesRedefinitionsWatcher",
testedVersions="")
public class HotSwapClassesRedefinitionsWatcherDefault
extends Object
implements HotSwapClassesRedefinitionsWatcher
The instance of this class will be created by
HotSwap Agent.
We bind it to the Guice context using
toInstance()
and this will inject
the required dependencies on members
("@Inject" annotated), directly.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final org.slf4j.Logger
protected org.hotswap.agent.command.Scheduler
This will be called by HotSwap Agent to inject the Scheduler instance.protected static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
classRedefined
(Class<?> classBeingRedefined) Listen to redefinitions of any class.protected Map<Class<?>,
Set<HotSwapClassesRedefinitionsListener>> protected org.hotswap.agent.command.Scheduler
protected SpincastConfig
void
Flag to know that dependencies have been injected by Guice.static void
init
(org.hotswap.agent.javassist.CtClass ctClass) protected boolean
void
Add a new listener for modifications to class redefinitions.void
Removes all listeners.void
Removes a listener.void
setBoundListerns
(Set<HotSwapClassesRedefinitionsListener> boundListeners) Guice injects the bound listeners
-
Field Details
-
logger
protected static final org.slf4j.Logger logger -
THIS_CLASS_NAME
- See Also:
-
scheduler
@Init protected org.hotswap.agent.command.Scheduler schedulerThis will be called by HotSwap Agent to inject the Scheduler instance.
-
-
Constructor Details
-
HotSwapClassesRedefinitionsWatcherDefault
public HotSwapClassesRedefinitionsWatcherDefault()
-
-
Method Details
-
guiceInjected
@Inject public void guiceInjected()Flag to know that dependencies have been injected by Guice. -
isGuiceInjected
protected boolean isGuiceInjected() -
getScheduler
protected org.hotswap.agent.command.Scheduler getScheduler() -
getSpincastConfig
-
setBoundListerns
@Inject public void setBoundListerns(@Nullable Set<HotSwapClassesRedefinitionsListener> boundListeners) Guice injects the bound listeners -
getListenersByClassToWatch
-
init
@OnClassLoadEvent(classNameRegexp="org.spincast.plugins.hotswap.classeswatcher.HotSwapClassesRedefinitionsWatcherDefault", events=DEFINE) public static void init(org.hotswap.agent.javassist.CtClass ctClass) throws org.hotswap.agent.javassist.NotFoundException, org.hotswap.agent.javassist.CannotCompileException - Throws:
org.hotswap.agent.javassist.NotFoundException
org.hotswap.agent.javassist.CannotCompileException
-
registerListener
Description copied from interface:HotSwapClassesRedefinitionsWatcher
Add a new listener for modifications to class redefinitions.More than one listeners can be added for the same class!
- Specified by:
registerListener
in interfaceHotSwapClassesRedefinitionsWatcher
-
removeListener
Description copied from interface:HotSwapClassesRedefinitionsWatcher
Removes a listener.- Specified by:
removeListener
in interfaceHotSwapClassesRedefinitionsWatcher
-
removeAllListeners
public void removeAllListeners()Description copied from interface:HotSwapClassesRedefinitionsWatcher
Removes all listeners.- Specified by:
removeAllListeners
in interfaceHotSwapClassesRedefinitionsWatcher
-
classRedefined
@OnClassLoadEvent(classNameRegexp=".+", events=REDEFINE) public void classRedefined(Class<?> classBeingRedefined) Listen to redefinitions of any class.
-