Class CAstImpl
java.lang.Object
com.ibm.wala.cast.tree.impl.CAstImpl
- All Implemented Interfaces:
CAst
- Direct Known Subclasses:
CAstValueImpl
An implementation of CAst, i.e. a simple factory for creating capa ast nodes. This class simply
creates generic nodes with a kind field, and either an array of children or a constant values.
Note that there is no easy way to mutate these trees; do not change this (see CAstNode for the
rationale for this rule).
- Author:
- Julian Dolby (dolby@us.ibm.com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmakeConstant(boolean value) Make a boolean constant node.makeConstant(char value) Make a char constant node.makeConstant(double value) Make a double-precision floating point constant node.makeConstant(float value) Make a single-precision floating point constant node.makeConstant(int value) Make an integer constant node.makeConstant(long value) Make a long integer constant node.makeConstant(short value) Make a short integer constant node.makeConstant(Object value) Make an arbitrary object constant node.makeNode(int kind) Make a node of type kind with no children.Make a node of type kind with one child.Make a node of type kind specifying an array of children.Make a node of type kind with two children.Make a node of type kind giving a first child and array of the rest.Make a node of type kind with three children.Make a node of type kind with four children.Make a node of type kind with five children.Make a node of type kind with six children.Make a node of type kind specifying a list of children.Make a new identifier, unique to this CAst instance.
-
Constructor Details
-
CAstImpl
public CAstImpl()
-
-
Method Details
-
makeUnique
Description copied from interface:CAstMake a new identifier, unique to this CAst instance.- Specified by:
makeUniquein interfaceCAst
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeNode
-
makeConstant
Description copied from interface:CAstMake an arbitrary object constant node.- Specified by:
makeConstantin interfaceCAst
-
makeConstant
Description copied from interface:CAstMake a boolean constant node.- Specified by:
makeConstantin interfaceCAst
-
makeConstant
Description copied from interface:CAstMake a char constant node.- Specified by:
makeConstantin interfaceCAst
-
makeConstant
Description copied from interface:CAstMake a short integer constant node.- Specified by:
makeConstantin interfaceCAst
-
makeConstant
Description copied from interface:CAstMake an integer constant node.- Specified by:
makeConstantin interfaceCAst
-
makeConstant
Description copied from interface:CAstMake a long integer constant node.- Specified by:
makeConstantin interfaceCAst
-
makeConstant
Description copied from interface:CAstMake a single-precision floating point constant node.- Specified by:
makeConstantin interfaceCAst
-
makeConstant
Description copied from interface:CAstMake a double-precision floating point constant node.- Specified by:
makeConstantin interfaceCAst
-