|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.server.reloader.Reloader
public final class Reloader
This class handles loading classes in such a way that when their source .class files change we discard existing info and cause the classes to be reloaded. Used in development.
The DomApplication class is responsible for instantiating all user-changeable classes by converting strings to Class instances. This DomApplication class itself is not reloadable (for now), but it's classloader must pass all loads to the classloader here so we can determine if a class is to be reloadable.
We have a total of three ClassLoaders in this process:
Constructor Summary | |
---|---|
Reloader(java.lang.String paths)
Create a reloader which handles the specified classes. |
Method Summary | |
---|---|
void |
clear()
|
java.lang.ClassLoader |
getReloadingLoader()
|
java.net.URL[] |
getUrls()
|
boolean |
isChanged()
Checks for changes on this classloader. |
java.lang.Class<DomApplication> |
loadApplication(java.lang.String classname)
Used to load the Application class so it uses the proper ClassLoader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Reloader(java.lang.String paths)
paths
- Method Detail |
---|
public java.net.URL[] getUrls()
public java.lang.ClassLoader getReloadingLoader()
public java.lang.Class<DomApplication> loadApplication(java.lang.String classname) throws java.lang.Exception
classname
-
java.lang.Exception
public boolean isChanged()
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |