Package org.jboss.modules
Class FilteredIterableLocalLoader
- java.lang.Object
-
- org.jboss.modules.FilteredIterableLocalLoader
-
- All Implemented Interfaces:
IterableLocalLoader,LocalLoader
class FilteredIterableLocalLoader extends java.lang.Object implements IterableLocalLoader
-
-
Field Summary
Fields Modifier and Type Field Description private ClassFilterclassFilterprivate IterableLocalLoaderoriginalLoaderprivate PathFilterresourcePathFilter
-
Constructor Summary
Constructors Constructor Description FilteredIterableLocalLoader(ClassFilter classFilter, PathFilter resourcePathFilter, IterableLocalLoader originalLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<Resource>iterateResources(java.lang.String startPath, boolean recursive)Enumerate all the resources under the given path.java.lang.Class<?>loadClassLocal(java.lang.String name, boolean resolve)Load a class which is locally defined by this loader.java.lang.PackageloadPackageLocal(java.lang.String name)Load a package which is locally defined by this loader.java.util.List<Resource>loadResourceLocal(java.lang.String name)Load a resource which is locally defined by this loader.
-
-
-
Field Detail
-
classFilter
private final ClassFilter classFilter
-
originalLoader
private final IterableLocalLoader originalLoader
-
resourcePathFilter
private final PathFilter resourcePathFilter
-
-
Constructor Detail
-
FilteredIterableLocalLoader
FilteredIterableLocalLoader(ClassFilter classFilter, PathFilter resourcePathFilter, IterableLocalLoader originalLoader)
-
-
Method Detail
-
loadClassLocal
public java.lang.Class<?> loadClassLocal(java.lang.String name, boolean resolve)Description copied from interface:LocalLoaderLoad a class which is locally defined by this loader.- Specified by:
loadClassLocalin interfaceLocalLoader- Parameters:
name- the class nameresolve-trueto resolve the class- Returns:
- the class, or
nullif there is no local class with this name
-
loadPackageLocal
public java.lang.Package loadPackageLocal(java.lang.String name)
Description copied from interface:LocalLoaderLoad a package which is locally defined by this loader.- Specified by:
loadPackageLocalin interfaceLocalLoader- Parameters:
name- the package name- Returns:
- the package, or
nullif there is no local package with this name
-
loadResourceLocal
public java.util.List<Resource> loadResourceLocal(java.lang.String name)
Description copied from interface:LocalLoaderLoad a resource which is locally defined by this loader. The given name is a path separated by "/" characters.- Specified by:
loadResourceLocalin 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
public java.util.Iterator<Resource> iterateResources(java.lang.String startPath, boolean recursive)
Description copied from interface:IterableLocalLoaderEnumerate 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:
iterateResourcesin interfaceIterableLocalLoader- Parameters:
startPath- the path to search underrecursive-trueto recursively descend into subdirectories,falseto only read this path- Returns:
- the resource iterator (possibly empty)
-
-