Package jaxx.compiler.css.parser
Class SimpleNode
java.lang.Object
jaxx.compiler.css.parser.SimpleNode
- All Implemented Interfaces:
Node
public class SimpleNode extends java.lang.Object implements Node
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SimpleNode(int i)SimpleNode(CSSParser p, int i) -
Method Summary
Modifier and Type Method Description voiddump(java.lang.String prefix)SimpleNodegetChild(int i)intgetId()SimpleNodegetParent()java.lang.StringgetText()voidjjtAddChild(Node n, int i)This method tells the node to add its argument to the node's list of children.voidjjtClose()This method is called after all the child nodes have been added.NodejjtGetChild(int i)intjjtGetNumChildren()NodejjtGetParent()voidjjtOpen()This method is called after the node has been made the current node.voidjjtSetParent(Node n)This pair of methods are used to inform the node of its parent.java.lang.StringtoString()java.lang.StringtoString(java.lang.String prefix)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
parent
-
children
-
id
protected int id -
parser
-
firstToken
-
lastToken
-
-
Constructor Details
-
SimpleNode
public SimpleNode(int i) -
SimpleNode
-
-
Method Details
-
getId
public int getId() -
jjtOpen
public void jjtOpen()Description copied from interface:NodeThis method is called after the node has been made the current node. It indicates that child nodes can now be added to it. -
jjtClose
public void jjtClose()Description copied from interface:NodeThis method is called after all the child nodes have been added. -
jjtSetParent
Description copied from interface:NodeThis pair of methods are used to inform the node of its parent.- Specified by:
jjtSetParentin interfaceNode- Parameters:
n- node
-
jjtGetParent
- Specified by:
jjtGetParentin interfaceNode
-
getParent
-
jjtAddChild
Description copied from interface:NodeThis method tells the node to add its argument to the node's list of children.- Specified by:
jjtAddChildin interfaceNode- Parameters:
n- nodei- pos
-
jjtGetChild
- Specified by:
jjtGetChildin interfaceNode- Parameters:
i- pos- Returns:
- a child node. The children are numbered from zero, left to right.
-
getChild
-
jjtGetNumChildren
public int jjtGetNumChildren()- Specified by:
jjtGetNumChildrenin interfaceNode- Returns:
- the number of children the node has.
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String prefix) -
dump
public void dump(java.lang.String prefix) -
getText
public java.lang.String getText()- Returns:
- the text of the tokens comprising this node.
-