In order for a Loader
implementation to successfully operate with a Container
implementation that implements reloading, it must obey the following constraints:
Lifecycle
so that the Container can indicate that a new class loader is required. start()
method must unconditionally create a new ClassLoader
implementation. stop()
method must throw away its reference to the ClassLoader
previously utilized, so that the class loader, all classes loaded by it, and all objects of those classes, can be garbage collected. stop()
to be followed by a call to start()
on the same Loader
instance. Container.reload()
method on the owning Container
when a change to one or more of the class files loaded by this class loader is detected.
|
|
|
|
|
|