|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.clazz.common.ClazzElementSupport
org.apache.commons.clazz.Clazz
org.apache.commons.clazz.reflect.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(org.apache.commons.clazz.ClazzLoader loader,
Class instanceClass)
|
|
| Method Summary | |
protected void |
addInstanceFactory(org.apache.commons.clazz.ClazzInstanceFactory factory)
|
protected void |
addOperation(org.apache.commons.clazz.ClazzOperation operation)
|
protected void |
addProperty(org.apache.commons.clazz.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. |
org.apache.commons.clazz.ClazzInstanceFactory |
getInstanceFactory(String signature)
Returns ClazzInstanceFactory for the given signature. |
protected abstract ReflectedInstanceFactoryIntrospector[] |
getInstanceFactoryIntrospectors()
|
org.apache.commons.clazz.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. |
org.apache.commons.clazz.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. |
org.apache.commons.clazz.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(org.apache.commons.clazz.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.Clazz |
addClazzChangeListener, addClazzLoaderFactory, constructSignature, constructSignature, fireInstanceFactoryAdded, fireInstanceFactoryRemoved, fireOperationAdded, fireOperationRemoved, firePropertyAdded, firePropertyRemoved, getCanonicalClassName, getClazz, getClazz, getClazzLoader, getClazzLoader, getClazzLoaderFactory, getDefaultClazzLoader, getDefaultClazzModel, getName, getPackageName, getShortClassName, newInstance, newInstance, removeClazzChangeListener, setDefaultClazzModel |
| 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(org.apache.commons.clazz.ClazzLoader loader,
Class instanceClass)
loader - instanceClass - | Method Detail |
public Class getInstanceClass()
org.apache.commons.clazz.ClazznewInstance()
method.
protected abstract ReflectedPropertyIntrospector[] getPropertyIntrospectors()
protected abstract ReflectedOperationIntrospector[] getOperationIntrospectors()
getPropertyIntrospectors()protected abstract ReflectedInstanceFactoryIntrospector[] getInstanceFactoryIntrospectors()
getPropertyIntrospectors()public boolean isLoggingEnabled()
public Class getReflectedClass()
public org.apache.commons.clazz.Clazz getSuperclazz()
org.apache.commons.clazz.Clazz
Clazz.getSuperclazz()public List getDeclaredProperties()
public List getProperties()
org.apache.commons.clazz.Clazz
public org.apache.commons.clazz.ClazzProperty getProperty(String name)
org.apache.commons.clazz.Clazz
protected void addProperty(org.apache.commons.clazz.ClazzProperty property)
public List getOperations()
org.apache.commons.clazz.Clazz
public List getDeclaredOperations()
org.apache.commons.clazz.Clazz
Clazz.getDeclaredOperations()public org.apache.commons.clazz.ClazzOperation getOperation(String signature)
org.apache.commons.clazz.Clazz"name(paramClazzName1,...)"
Clazz.getOperation(java.lang.String)protected void addOperation(org.apache.commons.clazz.ClazzOperation operation)
public List getInstanceFactories()
public org.apache.commons.clazz.ClazzInstanceFactory getInstanceFactory(String signature)
org.apache.commons.clazz.Clazz"(paramClazzName1,...)". You
can pass null in place of "()".
Clazz.getInstanceFactory(java.lang.String)protected void addInstanceFactory(org.apache.commons.clazz.ClazzInstanceFactory factory)
public boolean isAssignableFrom(org.apache.commons.clazz.Clazz 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 | ||||||||||