|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.pogamut.introspection.DefaultIntrospectableProxy<T>
public abstract class DefaultIntrospectableProxy<T>
This is wrapper class for introspectable objects. You have to give it
object to be introspected in the constructor and implement methods
computing array of properties and array of children objects
(computeProperties()
and computeChildren()
).
This abstract implementation caches computed results and returns them by
getProperties()
and getChildren()
methods.
Field Summary | |
---|---|
private IntrospectableProxy[] |
children
Array of introspectable children of object represented by this proxy computed by computeChildren(object) . |
private T |
object
Object represented by this proxy. |
private Property[] |
properties
Array of properties of object represented by this proxy computed by computeProperties(object) . |
Constructor Summary | |
---|---|
DefaultIntrospectableProxy(T object)
Creates a new instance of IntrospectableProxy and bind it with given object. |
Method Summary | |
---|---|
protected abstract IntrospectableProxy[] |
computeChildren(T object)
Computes list of introspectable children of object to be introspected. |
protected abstract Property[] |
computeProperties(T object)
Computes list of properties of object to be introspected. |
IntrospectableProxy[] |
getChildren()
Returns lazy initialized list of children. |
java.lang.String |
getName()
Returns getProxiedObject().toString(); It is strongly recomended to override this method. |
Property[] |
getProperties()
Returns lazy initialized list of properties. |
protected T |
getProxiedObject()
Return object proxied by this IntrospectableProxy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.pogamut.introspection.IntrospectableProxy |
---|
closeIntrospection |
Field Detail |
---|
private IntrospectableProxy[] children
computeChildren(object)
.
private Property[] properties
computeProperties(object)
.
private T object
Constructor Detail |
---|
public DefaultIntrospectableProxy(T object)
object
- Object to be introspected.Method Detail |
---|
public IntrospectableProxy[] getChildren()
getChildren
in interface IntrospectableProxy
public Property[] getProperties()
getProperties
in interface IntrospectableProxy
public java.lang.String getName()
getName
in interface IntrospectableProxy
protected abstract Property[] computeProperties(T object)
object
- Object to be introspected.
protected abstract IntrospectableProxy[] computeChildren(T object)
object
- Object to be introspected.
protected T getProxiedObject()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |