Package org.jboss.modules
Class FilteredIterableLocalLoader
java.lang.Object
org.jboss.modules.FilteredIterableLocalLoader
- All Implemented Interfaces:
IterableLocalLoader
,LocalLoader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClassFilter
private final IterableLocalLoader
private final PathFilter
-
Constructor Summary
ConstructorsConstructorDescriptionFilteredIterableLocalLoader
(ClassFilter classFilter, PathFilter resourcePathFilter, IterableLocalLoader originalLoader) -
Method Summary
Modifier and TypeMethodDescriptioniterateResources
(String startPath, boolean recursive) Enumerate all the resources under the given path.Class<?>
loadClassLocal
(String name, boolean resolve) Load a class which is locally defined by this loader.loadPackageLocal
(String name) Load a package which is locally defined by this loader.loadResourceLocal
(String name) Load a resource which is locally defined by this loader.
-
Field Details
-
classFilter
-
originalLoader
-
resourcePathFilter
-
-
Constructor Details
-
FilteredIterableLocalLoader
FilteredIterableLocalLoader(ClassFilter classFilter, PathFilter resourcePathFilter, IterableLocalLoader originalLoader)
-
-
Method Details
-
loadClassLocal
Description copied from interface:LocalLoader
Load a class which is locally defined by this loader.- Specified by:
loadClassLocal
in interfaceLocalLoader
- Parameters:
name
- the class nameresolve
-true
to resolve the class- Returns:
- the class, or
null
if there is no local class with this name
-
loadPackageLocal
Description copied from interface:LocalLoader
Load a package which is locally defined by this loader.- Specified by:
loadPackageLocal
in interfaceLocalLoader
- Parameters:
name
- the package name- Returns:
- the package, or
null
if there is no local package with this name
-
loadResourceLocal
Description copied from interface:LocalLoader
Load a resource which is locally defined by this loader. The given name is a path separated by "/
" characters.- Specified by:
loadResourceLocal
in interfaceLocalLoader
- Parameters:
name
- the resource path- Returns:
- the resource or resources, or an empty list if there is no local resource with this name
-
iterateResources
Description copied from interface:IterableLocalLoader
Enumerate all the resources under the given path. The given path name is relative to the root of the resource loader. If the path "escapes" the root via..
, such segments will be consumed. If the path is absolute, it will be converted to a relative path by dropping the leading/
.- Specified by:
iterateResources
in interfaceIterableLocalLoader
- Parameters:
startPath
- the path to search underrecursive
-true
to recursively descend into subdirectories,false
to only read this path- Returns:
- the resource iterator (possibly empty)
-