public.javadoc.org.spincast.plugins.hotswap.classeswatcher.HotSwapClassesRedefinitionsListener.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
HotSwapClassesRedefinitionsListener (org.spincast:spincast-framework 1.0.0 API)
org.spincast.plugins.hotswap.classeswatcher
Interface HotSwapClassesRedefinitionsListener
-
public interface HotSwapClassesRedefinitionsListener
A listener for classes redefinitions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type
Method and Description
void
classRedefined(Class<?> redefinedClass)
Called when a watched class is redefined.
Set<Class<?>>
getClassesToWatch()
The class(es) to watch.
boolean
isEnabled()
Should this listener be enabled?
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Should this listener be enabled?
In most cases, you only want to be able to auto
reload classes during development.
When this method return false
, the
listener is not registered, at all.
A common pattern for this method is to use:
return getSpincastConfig().isDevelopmentMode();
-
classRedefined
void classRedefined(Class<?> redefinedClass)
Called when a watched class is redefined.
Receives the class that was modified.
The method is called in a new Thread.
Copyright © 2019. All rights reserved.