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
FieldsModifier and TypeFieldDescriptionprotected static final org.slf4j.Loggerprotected org.hotswap.agent.command.SchedulerThis will be called by HotSwap Agent to inject the Scheduler instance.protected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclassRedefined(Class<?> classBeingRedefined) Listen to redefinitions of any class.protected Map<Class<?>,Set<HotSwapClassesRedefinitionsListener>> protected org.hotswap.agent.command.Schedulerprotected SpincastConfigvoidFlag to know that dependencies have been injected by Guice.static voidinit(org.hotswap.agent.javassist.CtClass ctClass) protected booleanvoidAdd a new listener for modifications to class redefinitions.voidRemoves all listeners.voidRemoves a listener.voidsetBoundListerns(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.NotFoundExceptionorg.hotswap.agent.javassist.CannotCompileException
-
registerListener
Description copied from interface:HotSwapClassesRedefinitionsWatcherAdd a new listener for modifications to class redefinitions.More than one listeners can be added for the same class!
- Specified by:
registerListenerin interfaceHotSwapClassesRedefinitionsWatcher
-
removeListener
Description copied from interface:HotSwapClassesRedefinitionsWatcherRemoves a listener.- Specified by:
removeListenerin interfaceHotSwapClassesRedefinitionsWatcher
-
removeAllListeners
public void removeAllListeners()Description copied from interface:HotSwapClassesRedefinitionsWatcherRemoves all listeners.- Specified by:
removeAllListenersin interfaceHotSwapClassesRedefinitionsWatcher
-
classRedefined
@OnClassLoadEvent(classNameRegexp=".+", events=REDEFINE) public void classRedefined(Class<?> classBeingRedefined) Listen to redefinitions of any class.
-