All Packages Class Hierarchy This Package Previous Next Index
Class sun.beanbox.SimpleClassLoader
java.lang.Object
|
+----java.lang.ClassLoader
|
+----sun.beanbox.SimpleClassLoader
- public class SimpleClassLoader
- extends ClassLoader
-
ourLoader
-
-
urlPrefix
-
-
applyDefinitions(Vector)
- Define a class from the bytecodes that were collected early...
-
createLoader(String, String)
- Returns an InputStream on the resource
-
defineClassFromBytes(String, byte[])
- Set some bytecodes as a definition for a class.
-
getLocalResource(String)
- Return a URL to the desired resource.
-
getLocalResource(String, String)
-
-
getLocalResourceAsStream(String, String)
-
-
getResource(String)
-
-
getResourceAsStream(String)
-
-
instantiate(String, InputStreamProducer)
- Interface to Beans.instantiate.
-
loadClass(String)
- Load a class from this class loader.
-
loadClass(String, boolean)
- This is the main method for ClassLoaders, that is being redefined
-
loadClassFromFile(String)
- Helper function; load a class from a file
-
setLocalResourceSource(String, InputStreamProducer)
- Assign an InputStream as the source for a given property name
This value comes first after the system resources
urlPrefix
public static final String urlPrefix
ourLoader
public static SimpleClassLoader ourLoader
defineClassFromBytes
public void defineClassFromBytes(String name,
byte buf[])
- Set some bytecodes as a definition for a class.
Do not actually define the class until later
loadClassFromFile
public Class loadClassFromFile(String fileName) throws ClassNotFoundException
- Helper function; load a class from a file
loadClass
public Class loadClass(String name) throws ClassNotFoundException
- Load a class from this class loader.
- Throws: ClassNotFoundException
- if the class could not be found.
- Overrides:
- loadClass in class ClassLoader
loadClass
protected Class loadClass(String name,
boolean resolve) throws ClassNotFoundException
- This is the main method for ClassLoaders, that is being redefined
- Throws: ClassNotFoundException
- if the class could not be found.
- Overrides:
- loadClass in class ClassLoader
instantiate
public Object instantiate(String name,
InputStreamProducer isp) throws ClassNotFoundException, IOException
- Interface to Beans.instantiate.
Name is that of the bean.
The stream producer provides the serialized representation of the bean
setLocalResourceSource
public void setLocalResourceSource(String name,
InputStreamProducer isp)
- Assign an InputStream as the source for a given property name
This value comes first after the system resources
getResource
public URL getResource(String name)
- Overrides:
- getResource in class ClassLoader
getResourceAsStream
public InputStream getResourceAsStream(String name)
- Overrides:
- getResourceAsStream in class ClassLoader
getLocalResource
public URL getLocalResource(String name)
- Return a URL to the desired resource.
createLoader
public static SimpleClassLoader createLoader(String cookie,
String dir)
- Returns an InputStream on the resource
getLocalResource
public static Object getLocalResource(String cookie,
String name)
getLocalResourceAsStream
public static InputStream getLocalResourceAsStream(String cookie,
String name)
applyDefinitions
public synchronized boolean applyDefinitions(Vector classList)
- Define a class from the bytecodes that were collected early...
Will return false if there were problems applying the definitions
This is only invoked if we are defining classes up front.
Code will be removed if we don't discover any problems in testing.
All Packages Class Hierarchy This Package Previous Next Index