com.google.gwt.dev.js.rhino
Class Node

java.lang.Object
  extended by com.google.gwt.dev.js.rhino.Node
All Implemented Interfaces:
java.lang.Cloneable

public class Node
extends java.lang.Object
implements java.lang.Cloneable

This class implements the root of the intermediate representation.


Field Summary
static int BASE_LINENO_PROP
           
static int BOTH
           
static int BREAK_PROP
           
static int CASEARRAY_PROP
           
static int CASES_PROP
           
static int CODEOFFSET_PROP
           
static int CONTINUE_PROP
           
static int DEBUGSOURCE_PROP
           
static int DEFAULT_PROP
           
static int DIRECTCALL_PROP
           
static int END_LINENO_PROP
           
static int ENUM_PROP
           
static int FINALLY_PROP
           
static int FIXUPS_PROP
           
static int FUNCTION_PROP
           
static int ISNUMBER_PROP
           
static int LABEL_PROP
           
static int LASTUSE_PROP
           
static int LEFT
           
static int LOCAL_PROP
           
static int LOCALCOUNT_PROP
           
static int REGEXP_PROP
           
static int RIGHT
           
static int SOURCE_PROP
           
static int SOURCENAME_PROP
           
static int SPECIAL_PROP_PROP
           
static int SPECIALCALL_PROP
           
static int TARGET_PROP
           
static int TARGETBLOCK_PROP
           
static int TEMP_PROP
           
static int TYPE_PROP
           
static int USES_PROP
           
static int VARIABLE_PROP
           
static int VARS_PROP
           
 
Constructor Summary
Node(int nodeType)
           
Node(int nodeType, int value)
           
Node(int nodeType, Node child)
           
Node(int nodeType, Node[] children)
           
Node(int nodeType, Node child, int value)
           
Node(int nodeType, Node left, Node right)
           
Node(int nodeType, Node left, Node right, int value)
           
Node(int nodeType, Node left, Node mid, Node right)
           
Node(int nodeType, Node left, Node mid, Node right, int value)
           
Node(int nodeType, Node left, Node mid, Node mid2, Node right)
           
 
Method Summary
 void addChildrenToBack(Node children)
           
 void addChildToBack(Node child)
           
 boolean equals(java.lang.Object o)
           
 int getChildCount()
           
 double getDouble()
          Can only be called when getType() == TokenStream.NUMBER
 Node getFirstChild()
           
 int getIntDatum()
           
 Node getLastSibling()
           
 int getLineno()
           
 Node getNext()
           
 int getOperation()
           
 java.lang.Object getProp(int propType)
           
 java.lang.String getString()
          Can only be called when node has String context.
 int getType()
           
 int hashCode()
          Not usefully implemented.
static Node newNumber(double number)
           
static Node newNumber(int number)
           
static Node newString(int type, java.lang.String str)
           
static Node newString(java.lang.String str)
           
 void putIntProp(int propType, int prop)
           
 void putProp(int propType, java.lang.Object prop)
           
 void removeProp(int propType)
           
 void setIsSyntheticBlock(boolean val)
           
 void setString(java.lang.String s)
          Can only be called when node has String context.
 void setType(int type)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TARGET_PROP

public static final int TARGET_PROP
See Also:
Constant Field Values

BREAK_PROP

public static final int BREAK_PROP
See Also:
Constant Field Values

CONTINUE_PROP

public static final int CONTINUE_PROP
See Also:
Constant Field Values

ENUM_PROP

public static final int ENUM_PROP
See Also:
Constant Field Values

FUNCTION_PROP

public static final int FUNCTION_PROP
See Also:
Constant Field Values

TEMP_PROP

public static final int TEMP_PROP
See Also:
Constant Field Values

LOCAL_PROP

public static final int LOCAL_PROP
See Also:
Constant Field Values

CODEOFFSET_PROP

public static final int CODEOFFSET_PROP
See Also:
Constant Field Values

FIXUPS_PROP

public static final int FIXUPS_PROP
See Also:
Constant Field Values

VARS_PROP

public static final int VARS_PROP
See Also:
Constant Field Values

USES_PROP

public static final int USES_PROP
See Also:
Constant Field Values

REGEXP_PROP

public static final int REGEXP_PROP
See Also:
Constant Field Values

CASES_PROP

public static final int CASES_PROP
See Also:
Constant Field Values

DEFAULT_PROP

public static final int DEFAULT_PROP
See Also:
Constant Field Values

CASEARRAY_PROP

public static final int CASEARRAY_PROP
See Also:
Constant Field Values

SOURCENAME_PROP

public static final int SOURCENAME_PROP
See Also:
Constant Field Values

SOURCE_PROP

public static final int SOURCE_PROP
See Also:
Constant Field Values

TYPE_PROP

public static final int TYPE_PROP
See Also:
Constant Field Values

SPECIAL_PROP_PROP

public static final int SPECIAL_PROP_PROP
See Also:
Constant Field Values

LABEL_PROP

public static final int LABEL_PROP
See Also:
Constant Field Values

FINALLY_PROP

public static final int FINALLY_PROP
See Also:
Constant Field Values

LOCALCOUNT_PROP

public static final int LOCALCOUNT_PROP
See Also:
Constant Field Values

TARGETBLOCK_PROP

public static final int TARGETBLOCK_PROP
See Also:
Constant Field Values

VARIABLE_PROP

public static final int VARIABLE_PROP
See Also:
Constant Field Values

LASTUSE_PROP

public static final int LASTUSE_PROP
See Also:
Constant Field Values

ISNUMBER_PROP

public static final int ISNUMBER_PROP
See Also:
Constant Field Values

DIRECTCALL_PROP

public static final int DIRECTCALL_PROP
See Also:
Constant Field Values

BASE_LINENO_PROP

public static final int BASE_LINENO_PROP
See Also:
Constant Field Values

END_LINENO_PROP

public static final int END_LINENO_PROP
See Also:
Constant Field Values

SPECIALCALL_PROP

public static final int SPECIALCALL_PROP
See Also:
Constant Field Values

DEBUGSOURCE_PROP

public static final int DEBUGSOURCE_PROP
See Also:
Constant Field Values

BOTH

public static final int BOTH
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values
Constructor Detail

Node

public Node(int nodeType)

Node

public Node(int nodeType,
            Node child)

Node

public Node(int nodeType,
            Node left,
            Node right)

Node

public Node(int nodeType,
            Node left,
            Node mid,
            Node right)

Node

public Node(int nodeType,
            Node left,
            Node mid,
            Node mid2,
            Node right)

Node

public Node(int nodeType,
            Node[] children)

Node

public Node(int nodeType,
            int value)

Node

public Node(int nodeType,
            Node child,
            int value)

Node

public Node(int nodeType,
            Node left,
            Node right,
            int value)

Node

public Node(int nodeType,
            Node left,
            Node mid,
            Node right,
            int value)
Method Detail

newNumber

public static Node newNumber(int number)

newNumber

public static Node newNumber(double number)

newString

public static Node newString(java.lang.String str)

newString

public static Node newString(int type,
                             java.lang.String str)

getType

public int getType()

setType

public void setType(int type)

getIntDatum

public int getIntDatum()

getFirstChild

public Node getFirstChild()

getNext

public Node getNext()

getChildCount

public int getChildCount()

getLastSibling

public Node getLastSibling()

addChildToBack

public void addChildToBack(Node child)

addChildrenToBack

public void addChildrenToBack(Node children)

getProp

public java.lang.Object getProp(int propType)

putProp

public void putProp(int propType,
                    java.lang.Object prop)

putIntProp

public void putIntProp(int propType,
                       int prop)

removeProp

public void removeProp(int propType)

getOperation

public int getOperation()

getLineno

public int getLineno()

getDouble

public double getDouble()
                 throws java.lang.UnsupportedOperationException
Can only be called when getType() == TokenStream.NUMBER

Throws:
java.lang.UnsupportedOperationException

getString

public java.lang.String getString()
                           throws java.lang.UnsupportedOperationException
Can only be called when node has String context.

Throws:
java.lang.UnsupportedOperationException

setString

public void setString(java.lang.String s)
               throws java.lang.UnsupportedOperationException
Can only be called when node has String context.

Throws:
java.lang.UnsupportedOperationException

hashCode

public final int hashCode()
Not usefully implemented.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setIsSyntheticBlock

public void setIsSyntheticBlock(boolean val)