| java.lang.Object org.apache.commons.discovery.Resource org.apache.commons.discovery.ResourceClass
ResourceClass | public class ResourceClass extends Resource (Code) | | 'Resource' located by discovery.
Naming of methods becomes a real pain ('getClass()')
so I've patterned this after ClassLoader...
I think it works well as it will give users a point-of-reference.
author: Richard A. Sitze |
Method Summary | |
public Class | loadClass() Get the value of resourceClass.
Loading the class does NOT guarentee that the class can be
instantiated. | public static void | setLog(Log _log) | public String | toString() |
ResourceClass | public ResourceClass(Class resourceClass, URL resource)(Code) | | |
loadClass | public Class loadClass()(Code) | | Get the value of resourceClass.
Loading the class does NOT guarentee that the class can be
instantiated. Go figure.
The class can be instantiated when the class is linked/resolved,
and all dependencies are resolved.
Various JDKs do this at different times, so beware:
java.lang.NoClassDefFoundError when
calling Class.getDeclaredMethod() (JDK14),
java.lang.reflect.InvocationTargetException
(wrapping java.lang.NoClassDefFoundError) when calling
java.lang.newInstance (JDK13),
and who knows what else..
value of resourceClass. |
setLog | public static void setLog(Log _log)(Code) | | |
|
|