|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.filteredpush.rdf.reflection.ClassDeconstructor
public class ClassDeconstructor
Starting with a top-level class, works recursively on the tree of related classes (fields, methods, collections and sets) and stores java reflection information about how to access each classes members. Once initialized, can be used on an instance of the same top-level class to return all associated objects as a DeconstructedObjectGraph.
| Constructor Summary | |
|---|---|
ClassDeconstructor(java.lang.Class<?> clazz)
Constructor will take the top-level class given as an argument and walk the tree recursively to find all classes and all their members. |
|
| Method Summary | |
|---|---|
ClassMembers |
addClass(java.lang.Class<?> clazz)
Add a class and its members if it does not already exist in the list, otherwise, return the members of the existing entry. |
DeconstructedObjectGraph |
deconstruct(java.lang.Object topLevelObj)
Given an instance of the top-level class this ClassDeconstructor was initialized with, deconstruct the object and return a DeconstructedObjectGraph. |
DeconstructedObject |
getStaticClassInstance(java.lang.Class<?> clazz)
If an instance of a class which is not in the package of the top-level class package is needed, this method can be used to create and return an instance of that class (assuming the constructor takes no arguments and fields/methods are static. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassDeconstructor(java.lang.Class<?> clazz)
throws java.io.IOException,
java.lang.ClassNotFoundException
clazz -
java.io.IOException
java.lang.ClassNotFoundException| Method Detail |
|---|
public ClassMembers addClass(java.lang.Class<?> clazz)
throws java.io.IOException,
java.lang.ClassNotFoundException
clazz -
java.io.IOException
java.lang.ClassNotFoundException
public DeconstructedObjectGraph deconstruct(java.lang.Object topLevelObj)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.Exception
topLevelObj -
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.Exception
public DeconstructedObject getStaticClassInstance(java.lang.Class<?> clazz)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.io.IOException,
java.lang.ClassNotFoundException
clazz -
java.lang.InstantiationException
java.lang.IllegalAccessException
java.io.IOException
java.lang.ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||