All Packages This Package Previous Next
Interface sqlj.runtime.profile.Loader
- public interface interface Loader
A profile loader object is used as the context for profile instantiation
rather than a java class loader object. This allows flexibility to
runtime environments in which class loaders may not be properly defined
for all classes, and resource names would not otherwise be able to be
resolved.
- See Also:
- DefaultLoader
-
getResourceAsStream(String)
- Get an InputStream on a given resource.
-
loadClass(String)
- Requests the loader to load a class with the specified name.
loadClass
public abstract Class loadClass(String className) throws ClassNotFoundException
- Requests the loader to load a class with the specified name. The
loadClass method is called when a profile is instantiated and when
a profile attempts to find the java class of a type info object for
the first time.
Loaders should use a hashtable or other cache to avoid defining
classes with the same name multiple times.
- Parameters:
- name - the fully qualified name of the desired Class
- Returns:
- the resulting Class
- Throws: ClassNotFoundException
- if the loader cannot find a definition for the class
- See Also:
- instantiate, getJavaType
getResourceAsStream
public abstract InputStream getResourceAsStream(String name)
- Get an InputStream on a given resource. Will return null if no
resource with this name is found. This method is called when
instantiating serialized profiles.
The loader can choose what to do to locate the resource.
- Parameters:
- name - the name of the resource, to be used as is.
- Returns:
- an InputStream on the resource, or null if not found.
- See Also:
- instantiate
All Packages This Package Previous Next