public interface

ClassSpace

org.eclipse.sisu.space.ClassSpace
Known Indirect Subclasses

Class Overview

Represents an abstract collection of related classes and resources.

Summary

Public Methods
abstract DeferredClass<?> deferLoadClass(String name)
Defers loading of the named class from the surrounding class space.
abstract Enumeration<URL> findEntries(String path, String glob, boolean recurse)
Queries local class space content for entries matching the given pattern.
abstract URL getResource(String name)
Queries the surrounding class space for the resource with the given name.
abstract Enumeration<URL> getResources(String name)
Queries the surrounding class space for all resources with the given name.
abstract Class<?> loadClass(String name)
Loads the named class from the surrounding class space.

Public Methods

public abstract DeferredClass<?> deferLoadClass (String name)

Defers loading of the named class from the surrounding class space.

Parameters
name The class name
Returns
  • Deferred class

public abstract Enumeration<URL> findEntries (String path, String glob, boolean recurse)

Queries local class space content for entries matching the given pattern.

Parameters
path The initial search directory; for example "META-INF"
glob The filename glob pattern; for example "*.xml"
recurse If true recurse into sub-directories; otherwise only search initial directory
Returns
  • Sequence of URLs, one for each matching entry

public abstract URL getResource (String name)

Queries the surrounding class space for the resource with the given name.

Parameters
name The resource name
Returns
  • URL pointing to the resource; null if it wasn't found

public abstract Enumeration<URL> getResources (String name)

Queries the surrounding class space for all resources with the given name.

Parameters
name The resource name
Returns
  • Sequence of URLs, one for each matching resource

public abstract Class<?> loadClass (String name)

Loads the named class from the surrounding class space.

Parameters
name The class name
Returns
  • Class instance