|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ungoverned.moduleloader.search.ExhaustiveSearchPolicy
public class ExhaustiveSearchPolicy
This class implements a ModuleLoader search policy that exhaustively and linearly searches all modules when trying to load a particular class or resource. As a result of this algorithm, every class loader for every module is essentially identical, meaning that each will load a given class or resource from the same class loader. This search policy provides behavior similar to the standard CLASSPATH environment variable approach. The main difference is that modules can be added to the module manager at run time; thus, the class path is dynamically extended. This search policy is not fully dynamic, since it does not support the removal of modules at run time; if a module is removed from the module manager at run time, there is no attempt to clean up its loaded classes.
SearchPolicy
,
Module
,
ModuleClassLoader
,
ModuleManager
Constructor Summary | |
---|---|
ExhaustiveSearchPolicy()
|
Method Summary | |
---|---|
java.lang.Class |
findClass(Module module,
java.lang.String name)
This method finds the specified class for the specified module. |
java.net.URL |
findResource(Module module,
java.lang.String name)
This method finds the specified resource for the specified module. |
void |
setModuleManager(ModuleManager mgr)
This method is part of the SearchPolicy interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExhaustiveSearchPolicy()
Method Detail |
---|
public void setModuleManager(ModuleManager mgr) throws java.lang.IllegalStateException
setModuleManager
in interface SearchPolicy
mgr
- the module manager associated with this search policy.
java.lang.IllegalStateException
- if the method is called
more than once.public java.lang.Class findClass(Module module, java.lang.String name)
findClass
in interface SearchPolicy
module
- the target module that is loading the class.name
- the name of the class being loaded.
public java.net.URL findResource(Module module, java.lang.String name)
findResource
in interface SearchPolicy
module
- the target module that is loading the resource.name
- the name of the resource being loaded.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |