Package groovy.util.slurpersupport
Class NoChildren
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.util.slurpersupport.GPathResult
groovy.util.slurpersupport.NoChildren
- All Implemented Interfaces:
Buildable,GroovyObject,Writable,java.lang.Iterable
@Deprecated public class NoChildren extends GPathResult
Deprecated.
Lazy evaluated representation of a GPath expression returning no children.
As this class represents a GPath expression with no results, all methods
are either NOPs or return an empty result.
-
Field Summary
Fields inherited from class groovy.util.slurpersupport.GPathResult
name, namespaceMap, namespacePrefix, namespaceTagHints, parent -
Constructor Summary
Constructors Constructor Description NoChildren(GPathResult parent, java.lang.String name, java.util.Map<java.lang.String,java.lang.String> namespaceTagHints)Deprecated. -
Method Summary
Modifier and Type Method Description protected voidappendNode(java.lang.Object newValue)Deprecated.NOPbooleanasBoolean()Deprecated.Returnsfalse.voidbuild(GroovyObject builder)Deprecated.NOPjava.util.IteratorchildNodes()Deprecated.Returns an emptyIterator.GPathResultfind(Closure closure)Deprecated.Returnsthis.GPathResultfindAll(Closure closure)Deprecated.Returnsthis.java.util.Iteratoriterator()Deprecated.Returns an emptyIterator.java.util.IteratornodeIterator()Deprecated.Returns an empty iterator.GPathResultparents()Deprecated.Throws aGroovyRuntimeException, because it is not implemented yet.protected voidreplaceBody(java.lang.Object newValue)Deprecated.NOPprotected voidreplaceNode(Closure newValue)Deprecated.NOPintsize()Deprecated.Returns0.java.lang.Stringtext()Deprecated.Returns an emptyString.java.io.WriterwriteTo(java.io.Writer out)Deprecated.Does not write any output, just returns the writer.Methods inherited from class groovy.util.slurpersupport.GPathResult
breadthFirst, children, createIterator, declareNamespace, depthFirst, equals, getAt, getAt, getBody, getProperty, hashCode, isEmpty, leftShift, list, lookupNamespace, name, parent, plus, pop, putAt, setMetaClass, setProperty, toBigDecimal, toBigInteger, toBoolean, toDouble, toFloat, toInteger, toLong, toString, toURI, toURLMethods inherited from class groovy.lang.GroovyObjectSupport
getMetaClassMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface groovy.lang.GroovyObject
invokeMethodMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
NoChildren
public NoChildren(GPathResult parent, java.lang.String name, java.util.Map<java.lang.String,java.lang.String> namespaceTagHints)Deprecated.- Parameters:
parent- the GPathResult prior to the application of the expression creating this GPathResultname- if the GPathResult corresponds to something with a name, e.g. a nodenamespaceTagHints- the known tag to namespace mappings
-
-
Method Details
-
size
public int size()Deprecated.Returns0.- Specified by:
sizein classGPathResult- Returns:
0
-
text
public java.lang.String text()Deprecated.Returns an emptyString.- Specified by:
textin classGPathResult- Returns:
- an empty
String
-
parents
Deprecated.Throws aGroovyRuntimeException, because it is not implemented yet.- Specified by:
parentsin classGPathResult- Returns:
- the parents of this GPathResult
-
childNodes
public java.util.Iterator childNodes()Deprecated.Returns an emptyIterator.- Specified by:
childNodesin classGPathResult- Returns:
- an empty
Iterator
-
iterator
public java.util.Iterator iterator()Deprecated.Returns an emptyIterator.- Specified by:
iteratorin interfacejava.lang.Iterable- Specified by:
iteratorin classGPathResult- Returns:
- an empty
Iterator
-
find
Deprecated.Returnsthis.- Specified by:
findin classGPathResult- Parameters:
closure- a closure to filters the children of this GPathResult- Returns:
this
-
findAll
Deprecated.Returnsthis.- Specified by:
findAllin classGPathResult- Parameters:
closure- a closure to filters the children of this GPathResult- Returns:
this
-
nodeIterator
public java.util.Iterator nodeIterator()Deprecated.Returns an empty iterator.- Specified by:
nodeIteratorin classGPathResult- Returns:
- an empty iterator
-
writeTo
public java.io.Writer writeTo(java.io.Writer out) throws java.io.IOExceptionDeprecated.Does not write any output, just returns the writer.- Parameters:
out- the Writer to which this Writable should output its data.- Returns:
- the
Writerwhich was passed in - Throws:
java.io.IOException- if an error occurred while outputting data to the writer
-
build
Deprecated.NOP -
replaceNode
Deprecated.NOP- Specified by:
replaceNodein classGPathResult
-
replaceBody
protected void replaceBody(java.lang.Object newValue)Deprecated.NOP- Specified by:
replaceBodyin classGPathResult
-
appendNode
protected void appendNode(java.lang.Object newValue)Deprecated.NOP- Specified by:
appendNodein classGPathResult
-
asBoolean
public boolean asBoolean()Deprecated.Returnsfalse.- Returns:
false
-