|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.clazz.ClazzLoader
org.apache.commons.clazz.reflect.ReflectedClazzLoader
public abstract class ReflectedClazzLoader
| Constructor Summary | |
|---|---|
ReflectedClazzLoader(ModelClazzLoader modelClazzLoader,
ClassLoader classLoader)
|
|
| Method Summary | |
|---|---|
protected abstract Clazz |
createClazz(Class javaClass)
Override this method to construct an Clazz for the given Class (javaClass). |
Clazz |
defineClazz(String name,
Class clazzClass,
Class instanceClass)
Defines a new Clazz with the supplied name. |
Clazz |
getClazzForName(String name)
Given a Clazz name, returns the corresponding Clazz. |
String |
getClazzName(Object instance)
Returns the clazz name for the supplied instance. |
boolean |
isMember(Object instance)
Returns true for all objects. |
protected boolean |
isSupportedClass(Class javaClass)
Returns true for all classes supported by this specific clazz loader. |
protected Clazz |
lookupCustomClazz(Class javaClass)
Try to find and allocate a custom Clazz for the specified Java class. |
| Methods inherited from class org.apache.commons.clazz.ClazzLoader |
|---|
enableLogging, getClazz, getModel, getModelClazzLoader, isLoggingEnabled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReflectedClazzLoader(ModelClazzLoader modelClazzLoader,
ClassLoader classLoader)
| Method Detail |
|---|
public String getClazzName(Object instance)
ClazzLoadernull if it cannot produce a clazz name for the instance.
getClazzName in class ClazzLoaderpublic Clazz getClazzForName(String name)
ClazzLoaderNote that we use canonical class names for primitive types and arrays, e.g. "byte", "byte[]", "boolean[][]", "java.lang.String[]".
getClazzForName in class ClazzLoaderprotected Clazz lookupCustomClazz(Class javaClass)
javaClass -
public boolean isMember(Object instance)
true for all objects.
isMember in class ClazzLoaderClazzLoader.isMember(Object)protected boolean isSupportedClass(Class javaClass)
protected abstract Clazz createClazz(Class javaClass)
this.
public Clazz defineClazz(String name,
Class clazzClass,
Class instanceClass)
ClazzLoader
defineClazz in class ClazzLoadername - the name of the clazz, should be unique within the scope of
the top-level ClazzLoaderclazzClass - the Class of the Clazz that this method needs to
produce.instanceClass - the Class of the instances the new Clazz will be
able to create using the newInstance() method.
ClazzLoader.defineClazz(String, Class, Class)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||