|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jcon.data.BeanGraph
public class BeanGraph
This class treats an object as the root node in a graph. Edges on the graph correspond to bean properties. A path in the graph is a dot-separated list of properties to follow to chase down the desired node.
| Constructor Summary | |
|---|---|
BeanGraph()
Creates a new BeanGraph with no root bean. |
|
BeanGraph(java.lang.Class beanClass)
Creates a new BeanRecord, creating a new base bean by trying to instantiate an instance of the given class using the default constructor. |
|
BeanGraph(java.lang.Object bean)
Creates a new BeanGraph based on the given bean. |
|
| Method Summary | |
|---|---|
static java.lang.Object |
findNode(java.lang.Object root,
java.lang.String path)
Finds the node represented by following the dot-separated path from the given root object. |
static java.lang.Object |
findNodeOrNull(java.lang.Object root,
java.lang.String path)
Tries to find the node; returns null otherwise (i.e., doesn't barf an IllegalArgumentException on ye). |
static java.lang.Object |
findNodeRecursively(java.lang.Object root,
java.lang.String path)
This one's real cute. |
java.lang.Object |
getBean()
|
java.lang.Object |
nodeAt(java.lang.String path)
|
void |
setBean(java.lang.Object newBean)
|
static void |
setNode(java.lang.Object root,
java.lang.String path,
java.lang.Object newValue)
Sets the node represented by the string path to the value Value in object victim |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanGraph(java.lang.Object bean)
public BeanGraph()
public BeanGraph(java.lang.Class beanClass)
| Method Detail |
|---|
public static java.lang.Object findNodeRecursively(java.lang.Object root,
java.lang.String path)
public static java.lang.Object findNodeOrNull(java.lang.Object root,
java.lang.String path)
public static java.lang.Object findNode(java.lang.Object root,
java.lang.String path)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static void setNode(java.lang.Object root,
java.lang.String path,
java.lang.Object newValue)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.lang.Object nodeAt(java.lang.String path)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic java.lang.Object getBean()
public void setBean(java.lang.Object newBean)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||