|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.myarch.reloader.ReloadPackageController
Allows loading all classes in the packages listed with ReloadPackageController
.
Constructor Summary | |
ReloadPackageController()
Constructs a new ReloadPackageController with the empty
package list. |
|
ReloadPackageController(java.util.Collection packages)
Constructs a new ReloadPackageController with the
specified collection of packages. |
|
ReloadPackageController(java.lang.String pPackage)
Constructs a new ReloadPackageController with a package list
containing a single package. |
Method Summary | |
void |
addPackage(java.lang.String pPackage)
Add a package to the list of packages with reloadable classes. |
java.util.Collection |
getPackages()
Returns the current list (collection) of packages. |
boolean |
isLoadByParentAllowed(java.lang.String className,
java.lang.String mainClassName,
java.lang.ClassLoader loader)
Prohibits using parent loader for loadable classes. |
boolean |
isReloadAllowed(java.lang.String className,
java.lang.String mainClassName,
java.lang.ClassLoader loader)
Returns true if a class belongs to one of the packages from the
package list. |
void |
setPackages(java.util.Collection packages)
Sets the collection of packages. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReloadPackageController()
ReloadPackageController
with the empty
package list.public ReloadPackageController(java.util.Collection packages)
ReloadPackageController
with the
specified collection of packages.packages
- collection of packages. All classes in these packages can be
reloaded.public ReloadPackageController(java.lang.String pPackage)
ReloadPackageController
with a package list
containing a single package.pPackage
- package with reloadable classesMethod Detail |
public void setPackages(java.util.Collection packages)
packages
- collection of packages. All classes in these packages can be
reloaded.public java.util.Collection getPackages()
public void addPackage(java.lang.String pPackage)
pPackage
- package with reloadable classespublic boolean isReloadAllowed(java.lang.String className, java.lang.String mainClassName, java.lang.ClassLoader loader)
true
if a class belongs to one of the packages from the
package list.isReloadAllowed
in interface LoadController
className
- class name to loadmainClassName
- name of the "main" class.
Main class is a class passed as a parameter to Reloader.reload()
method.loader
- the actual class loader used to load a class.true
if class className
is allowed to be loaded.public boolean isLoadByParentAllowed(java.lang.String className, java.lang.String mainClassName, java.lang.ClassLoader loader)
Reloader
or ClassNotFoundException
is thrown.isLoadByParentAllowed
in interface LoadController
className
- class name to loadmainClassName
- name of the "main" class.
Main class is a class passed as a parameter to Reloader.reload()
method.loader
- the actual class loader used to load a class (parent loader).false
all the time to prohibit using the parent loader.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |