|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jayway.restassured.internal.path.xml.NodeBase
com.jayway.restassured.internal.path.xml.NodeImpl
public class NodeImpl
| Nested Class Summary | |
|---|---|
class |
NodeImpl.ValueIterator
|
| Constructor Summary | |
|---|---|
NodeImpl()
|
|
| Method Summary | ||
|---|---|---|
Map<String,String> |
attributes()
The node attributes, may be empty. |
|
NodeChildren |
children()
The node children |
|
|
get(String name)
Get a value from the current XML object. |
|
String |
getAttribute(String name)
Get the value of an attribute. |
|
Object |
getAttributes()
|
|
boolean |
getBoolean(String name)
|
|
byte |
getByte(String name)
|
|
char |
getChar(String name)
|
|
NodeChildren |
getChildren()
|
|
double |
getDouble(String name)
|
|
float |
getFloat(String name)
|
|
int |
getInt(String name)
|
|
|
getList(String name)
|
|
long |
getLong(String name)
|
|
groovy.lang.MetaClass |
getMetaClass()
|
|
Object |
getName()
|
|
Object |
getProperty(String property)
|
|
short |
getShort(String name)
|
|
Object |
getValue()
|
|
Object |
invokeMethod(String method,
Object arguments)
|
|
Iterator<String> |
iterator()
|
|
String |
name()
The name of the node |
|
void |
setAttributes(Object value)
|
|
void |
setChildren(NodeChildren value)
|
|
void |
setMetaClass(groovy.lang.MetaClass mc)
|
|
void |
setName(Object value)
|
|
void |
setProperty(String property,
Object value)
|
|
void |
setValue(Object value)
|
|
String |
toString()
|
|
String |
value()
The node value. |
|
| Methods inherited from class com.jayway.restassured.internal.path.xml.NodeBase |
|---|
get, getNode, getNodes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.jayway.restassured.path.xml.element.PathElement |
|---|
getNode, getNodes |
| Constructor Detail |
|---|
public NodeImpl()
| Method Detail |
|---|
public groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectgetMetaClass in class NodeBasepublic void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass in interface groovy.lang.GroovyObjectsetMetaClass in class NodeBase
public Object invokeMethod(String method,
Object arguments)
invokeMethod in interface groovy.lang.GroovyObjectinvokeMethod in class NodeBasepublic Object getProperty(String property)
getProperty in interface groovy.lang.GroovyObjectgetProperty in class NodeBase
public void setProperty(String property,
Object value)
setProperty in interface groovy.lang.GroovyObjectsetProperty in class NodeBasepublic Object getAttributes()
public void setAttributes(Object value)
public NodeChildren getChildren()
public void setChildren(NodeChildren value)
public Object getName()
public void setName(Object value)
public Object getValue()
public void setValue(Object value)
public Map<String,String> attributes()
Node
attributes in interface Nodepublic String name()
Node
name in interface Nodepublic Iterator<String> iterator()
iterator in interface Iterable<String>public String toString()
toString in class Objectpublic NodeChildren children()
Node
children in interface Nodepublic String getAttribute(String name)
Node
getAttribute in interface Nodename - The name of the attribute to get
public float getFloat(String name)
public double getDouble(String name)
public char getChar(String name)
public boolean getBoolean(String name)
public long getLong(String name)
public int getInt(String name)
public short getShort(String name)
public byte getByte(String name)
public <T> T get(String name)
PathElement
This method returns the child whose name matches name. If several
children matches the name then a List of Node's
are returned.
If this object is a Node and you want to return an attribute value you need to prefix the name with an @. E.g. given
<category type="present">
<item when="Aug 10">
<name>Kathryn's Birthday</name>
<price>200</price>
</item>
</category>
then
String type = node.get("@type");
will return "present".
get in interface PathElementget in class NodeBaseT - The expected type of the return value.name - The name of the child, children or attribute.
public String value()
Node
value in interface Nodepublic <T> List<T> getList(String name)
getList in class NodeBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||