|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.clazz.common.ClazzElementSupport org.apache.commons.clazz.Clazz org.apache.commons.clazz.reflect.ReflectedClazz
public abstract class ReflectedClazz
This implementation of Clazz is based on Java reflection.
Field Summary |
---|
Fields inherited from class org.apache.commons.clazz.Clazz |
---|
EXTENDED_CLAZZ_MODEL, STANDARD_CLAZZ_MODEL |
Constructor Summary | |
---|---|
ReflectedClazz(ClazzLoader loader,
Class instanceClass)
|
Method Summary | |
---|---|
protected void |
addInstanceFactory(ClazzInstanceFactory factory)
|
protected void |
addOperation(ClazzOperation operation)
|
protected void |
addProperty(ClazzProperty property)
|
protected BeanInfo |
getBeanInfo()
Performs BeanInfo lookup in the same manner as the standard java.beans.Introspector. |
List |
getDeclaredOperations()
Returns all Operations declared by this clazz, not its superclazzes. |
List |
getDeclaredProperties()
Returns properties introduced by this clazz as compared to the superclazz. |
Class |
getInstanceClass()
Returns the class of instances created by the newInstance()
method. |
List |
getInstanceFactories()
Returns all InstanceFactories for this clazz. |
ClazzInstanceFactory |
getInstanceFactory(String signature)
Returns ClazzInstanceFactory for the given signature. |
protected abstract ReflectedInstanceFactoryIntrospector[] |
getInstanceFactoryIntrospectors()
|
ClazzOperation |
getOperation(String signature)
Returns the Operation for the given signature. |
protected abstract ReflectedOperationIntrospector[] |
getOperationIntrospectors()
|
List |
getOperations()
Returns all Operations for this clazz. |
List |
getProperties()
Returns all properties for this clazz, including those declared by superclazzes. |
ClazzProperty |
getProperty(String name)
Returns a ClazzProperty for the given name |
protected abstract ReflectedPropertyIntrospector[] |
getPropertyIntrospectors()
The order of introspectors is significant, they are invoked sequencially. |
Class |
getReflectedClass()
Returns the class this ReflectedClazz is based upon. |
Clazz |
getSuperclazz()
Returns the superclazz for this Clazz, or null if there is none. |
protected void |
introspectInstanceFactories()
Override this method to provide an alternate way of mapping constructors, methods (and possibly fields) to InstanceFactories. |
protected void |
introspectOperations()
Override this method to provide an alternate way of mapping methods (and possibly fields) to Operations. |
protected void |
introspectProperties()
Override this method to provide an alternate way of mapping fields and methods to properties. |
boolean |
isAssignableFrom(Clazz clazz)
Overrides the default implementation, checks if the supplied clazz is also a ReflectedClazz and if so invokes isAssignableFrom on the corresponding java classes. |
boolean |
isLoggingEnabled()
Returns true if diagnostic is enabled for this clazz |
protected void |
logPropertyParseResults()
Prints diagnostics of property introspection. |
void |
logPropertyParseResults(Object parseResults)
Called by ReflectedPropertyIntrospector's to log results of introspection, successful or not. |
Methods inherited from class org.apache.commons.clazz.common.ClazzElementSupport |
---|
getAttribute, getAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.clazz.ClazzElement |
---|
getAttribute, getAttributes |
Constructor Detail |
---|
public ReflectedClazz(ClazzLoader loader, Class instanceClass)
loader
- instanceClass
- Method Detail |
---|
public Class getInstanceClass()
Clazz
newInstance()
method.
getInstanceClass
in class Clazz
protected abstract ReflectedPropertyIntrospector[] getPropertyIntrospectors()
protected abstract ReflectedOperationIntrospector[] getOperationIntrospectors()
getPropertyIntrospectors()
protected abstract ReflectedInstanceFactoryIntrospector[] getInstanceFactoryIntrospectors()
getPropertyIntrospectors()
public boolean isLoggingEnabled()
public Class getReflectedClass()
public Clazz getSuperclazz()
Clazz
getSuperclazz
in class Clazz
Clazz.getSuperclazz()
public List getDeclaredProperties()
getDeclaredProperties
in class Clazz
public List getProperties()
Clazz
getProperties
in class Clazz
public ClazzProperty getProperty(String name)
Clazz
getProperty
in class Clazz
protected void addProperty(ClazzProperty property)
public List getOperations()
Clazz
getOperations
in class Clazz
public List getDeclaredOperations()
Clazz
getDeclaredOperations
in class Clazz
Clazz.getDeclaredOperations()
public ClazzOperation getOperation(String signature)
Clazz
"name(paramClazzName1,...)"
getOperation
in class Clazz
Clazz.getOperation(java.lang.String)
protected void addOperation(ClazzOperation operation)
public List getInstanceFactories()
getInstanceFactories
in class Clazz
public ClazzInstanceFactory getInstanceFactory(String signature)
Clazz
"(paramClazzName1,...)"
. You
can pass null
in place of "()"
.
getInstanceFactory
in class Clazz
Clazz.getInstanceFactory(java.lang.String)
protected void addInstanceFactory(ClazzInstanceFactory factory)
public boolean isAssignableFrom(Clazz clazz)
isAssignableFrom
in class Clazz
protected void introspectProperties()
protected BeanInfo getBeanInfo()
protected void introspectOperations()
protected void introspectInstanceFactories()
public void logPropertyParseResults(Object parseResults)
protected void logPropertyParseResults()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |