|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.pogamut.introspection.DefaultIntrospectableProxy<java.lang.Object>
cz.cuni.pogamut.introspection.java.JavaReflectionProxy
public class JavaReflectionProxy
Implementation of automatic object introspection using Java Reflection API.
Primitive public fields of object (see javadoc fo list of primitive types)
marked by PogProp annotation are returned as Properties,
unknown more complicated types implementing Introspectable
interface
are returned as Children for further introspection.
TODO annotations arent working ... fix it
All returned properties are for now uneditable. Just for the sake of simplicity.
THIS EXAMPLE IMPLEMENTATION DOESN'T DEAL WITH INHERITANCE.
Field Summary | |
---|---|
private java.util.Set<IntrospectableProxyChangeListener> |
listeners
Listeners for change |
Constructor Summary | |
---|---|
JavaReflectionProxy(java.lang.Object object)
Creates a new instance of JavaReflectionProxy |
Method Summary | |
---|---|
void |
closeIntrospection()
This should clean up any bindings the IntrospectableProxy might have with the object it introspects to allow GC collect the object. |
protected IntrospectableProxy[] |
computeChildren(java.lang.Object object)
All data fields of introspected object that implement Introspectable interface are added to the list of children. |
protected Property[] |
computeProperties(java.lang.Object object)
All data fields which are marked by @PogProp annotation and PropertyEditorManager can find editor for them are recognized as Properties of introspectable proxy and are returned by this method. |
protected java.util.Collection<Property> |
getDeclaredProperties(java.lang.Class cls,
java.lang.Object object)
Get all PogProperties from given class. |
protected java.util.Collection<IntrospectableProxy> |
getDeclaredProxies(java.lang.Class cls,
java.lang.Object object)
Get all IntrospectableProxies from given class. |
Methods inherited from class cz.cuni.pogamut.introspection.DefaultIntrospectableProxy |
---|
getChildren, getName, getProperties, getProxiedObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Set<IntrospectableProxyChangeListener> listeners
Constructor Detail |
---|
public JavaReflectionProxy(java.lang.Object object)
Method Detail |
---|
protected java.util.Collection<Property> getDeclaredProperties(java.lang.Class cls, java.lang.Object object)
protected java.util.Collection<IntrospectableProxy> getDeclaredProxies(java.lang.Class cls, java.lang.Object object)
protected Property[] computeProperties(java.lang.Object object)
computeProperties
in class DefaultIntrospectableProxy<java.lang.Object>
object
- Object to be introspected.
protected IntrospectableProxy[] computeChildren(java.lang.Object object)
Introspectable
interface are added to the list of children.
computeChildren
in class DefaultIntrospectableProxy<java.lang.Object>
object
- Object to be introspected.
public void closeIntrospection()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |