Class TreeContext
java.lang.Object
org.codehaus.groovy.macro.matcher.TreeContext
public class TreeContext
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description void
afterVisit(Closure<?> action)
void
afterVisit(TreeContextAction action)
TreeContext
fork(ASTNode node)
ASTNode
getNode()
java.util.List<TreeContextAction>
getOnPopHandlers()
TreeContext
getParent()
Expression
getReplacement()
java.util.List<TreeContext>
getSiblings()
java.util.Map<?,java.util.List<?>>
getUserdata()
java.util.List<?>
getUserdata(java.lang.Object key)
java.util.List<?>
getUserdata(java.lang.Object key, boolean searchParent)
boolean
matches(Closure<java.lang.Boolean> predicate)
boolean
matches(ASTNodePredicate predicate)
void
putUserdata(java.lang.Object key, java.lang.Object value)
void
setReplacement(Expression replacement)
java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Method Details
-
getUserdata
public java.util.Map<?,java.util.List<?>> getUserdata() -
putUserdata
public void putUserdata(java.lang.Object key, java.lang.Object value) -
getUserdata
public java.util.List<?> getUserdata(java.lang.Object key) -
getUserdata
public java.util.List<?> getUserdata(java.lang.Object key, boolean searchParent) -
getParent
-
getNode
-
fork
-
matches
-
matches
public boolean matches(@DelegatesTo(value=ASTNode.class,strategy=1) Closure<java.lang.Boolean> predicate) -
getSiblings
-
getOnPopHandlers
-
afterVisit
-
afterVisit
-
setReplacement
-
getReplacement
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-