Top Fields Constructors Methods
org.jboss.modules

pack-priv Class FilteredIterableLocalLoader

extends Object
implements IterableLocalLoader
Class Inheritance
All Implemented Interfaces
org.jboss.modules.IterableLocalLoader, org.jboss.modules.LocalLoader
Imports
java.util.Collections, .Iterator, .List, org.jboss.modules.filter.ClassFilter, .PathFilter, .PathFilters

Author
David M. Lloyd

Field Summary

Modifier and TypeField and Description
private final ClassFilter
private final IterableLocalLoader
private final PathFilter

Constructor Summary

AccessConstructor and Description
pack-priv
FilteredIterableLocalLoader(final ClassFilter classFilter, final PathFilter resourcePathFilter, final IterableLocalLoader originalLoader)

Method Summary

Modifier and TypeMethod and Description
public Iterator<Resource>
iterateResources(final String
the path to search under
startPath
,
final boolean
true to recursively descend into subdirectories, false to only read this path
recursive
)

Implements org.jboss.modules.IterableLocalLoader.iterateResources.

Enumerate all the resources under the given path.
public Class<?>
loadClassLocal(final String
the class name
name
,
final boolean
true to resolve the class
resolve
)

Implements org.jboss.modules.LocalLoader.loadClassLocal.

Load a class which is locally defined by this loader.
public Package
loadPackageLocal(final String
the package name
name
)

Implements org.jboss.modules.LocalLoader.loadPackageLocal.

Load a package which is locally defined by this loader.
public List<Resource>
loadResourceLocal(final String
the resource path
name
)

Implements org.jboss.modules.LocalLoader.loadResourceLocal.

Load a resource which is locally defined by this loader.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classFilterback to summary
private final ClassFilter classFilter
originalLoaderback to summary
private final IterableLocalLoader originalLoader
resourcePathFilterback to summary
private final PathFilter resourcePathFilter

Constructor Detail

FilteredIterableLocalLoaderback to summary
pack-priv FilteredIterableLocalLoader(final ClassFilter classFilter, final PathFilter resourcePathFilter, final IterableLocalLoader originalLoader)

Method Detail

iterateResourcesback to summary
public Iterator<Resource> iterateResources(final String startPath, final boolean recursive)

Implements org.jboss.modules.IterableLocalLoader.iterateResources.

Doc from org.jboss.modules.IterableLocalLoader.iterateResources.

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 /.

Parameters
startPath:String

the path to search under

recursive:boolean

true to recursively descend into subdirectories, false to only read this path

Returns:Iterator<Resource>

the resource iterator (possibly empty)

loadClassLocalback to summary
public Class<?> loadClassLocal(final String name, final boolean resolve)

Implements org.jboss.modules.LocalLoader.loadClassLocal.

Doc from org.jboss.modules.LocalLoader.loadClassLocal.

Load a class which is locally defined by this loader.

Parameters
name:String

the class name

resolve:boolean

true to resolve the class

Returns:Class<?>

the class, or null if there is no local class with this name

loadPackageLocalback to summary
public Package loadPackageLocal(final String name)

Implements org.jboss.modules.LocalLoader.loadPackageLocal.

Doc from org.jboss.modules.LocalLoader.loadPackageLocal.

Load a package which is locally defined by this loader.

Parameters
name:String

the package name

Returns:Package

the package, or null if there is no local package with this name

loadResourceLocalback to summary
public List<Resource> loadResourceLocal(final String name)

Implements org.jboss.modules.LocalLoader.loadResourceLocal.

Doc from org.jboss.modules.LocalLoader.loadResourceLocal.

Load a resource which is locally defined by this loader. The given name is a path separated by "/" characters.

Parameters
name:String

the resource path

Returns:List<Resource>

the resource or resources, or an empty list if there is no local resource with this name