polyglot.ast
Interface NodeFactory
- All Known Subinterfaces:
- CofferNodeFactory
- All Known Implementing Classes:
- AbstractNodeFactory_c, CofferNodeFactory_c, NodeFactory_c, PaoNodeFactory_c
public interface NodeFactory
A NodeFactory
constructs AST nodes. All node construction
should go through this factory or be done with the copy()
method of Node
.
Method Summary |
AmbAssign |
AmbAssign(Position pos,
Expr target,
Assign.Operator op,
Expr source)
|
AmbExpr |
AmbExpr(Position pos,
java.lang.String name)
|
AmbPrefix |
AmbPrefix(Position pos,
Prefix prefix,
java.lang.String name)
|
AmbPrefix |
AmbPrefix(Position pos,
java.lang.String name)
|
AmbQualifierNode |
AmbQualifierNode(Position pos,
QualifierNode qual,
java.lang.String name)
|
AmbQualifierNode |
AmbQualifierNode(Position pos,
java.lang.String name)
|
AmbReceiver |
AmbReceiver(Position pos,
Prefix prefix,
java.lang.String name)
|
AmbReceiver |
AmbReceiver(Position pos,
java.lang.String name)
|
AmbTypeNode |
AmbTypeNode(Position pos,
QualifierNode qualifier,
java.lang.String name)
|
AmbTypeNode |
AmbTypeNode(Position pos,
java.lang.String name)
|
ArrayAccess |
ArrayAccess(Position pos,
Expr base,
Expr index)
|
ArrayAccessAssign |
ArrayAccessAssign(Position pos,
ArrayAccess target,
Assign.Operator op,
Expr source)
|
ArrayInit |
ArrayInit(Position pos)
|
ArrayInit |
ArrayInit(Position pos,
java.util.List elements)
|
ArrayTypeNode |
ArrayTypeNode(Position pos,
TypeNode base)
|
Assert |
Assert(Position pos,
Expr cond)
|
Assert |
Assert(Position pos,
Expr cond,
Expr errorMessage)
|
Assign |
Assign(Position pos,
Expr target,
Assign.Operator op,
Expr source)
|
Binary |
Binary(Position pos,
Expr left,
Binary.Operator op,
Expr right)
|
Block |
Block(Position pos)
|
Block |
Block(Position pos,
java.util.List statements)
|
Block |
Block(Position pos,
Stmt s1)
|
Block |
Block(Position pos,
Stmt s1,
Stmt s2)
|
Block |
Block(Position pos,
Stmt s1,
Stmt s2,
Stmt s3)
|
Block |
Block(Position pos,
Stmt s1,
Stmt s2,
Stmt s3,
Stmt s4)
|
BooleanLit |
BooleanLit(Position pos,
boolean value)
|
Branch |
Branch(Position pos,
Branch.Kind kind)
|
Branch |
Branch(Position pos,
Branch.Kind kind,
java.lang.String label)
|
Branch |
Break(Position pos)
|
Branch |
Break(Position pos,
java.lang.String label)
|
Call |
Call(Position pos,
Receiver target,
java.lang.String name)
|
Call |
Call(Position pos,
Receiver target,
java.lang.String name,
Expr a1)
|
Call |
Call(Position pos,
Receiver target,
java.lang.String name,
Expr a1,
Expr a2)
|
Call |
Call(Position pos,
Receiver target,
java.lang.String name,
Expr a1,
Expr a2,
Expr a3)
|
Call |
Call(Position pos,
Receiver target,
java.lang.String name,
Expr a1,
Expr a2,
Expr a3,
Expr a4)
|
Call |
Call(Position pos,
Receiver target,
java.lang.String name,
java.util.List args)
|
Call |
Call(Position pos,
java.lang.String name)
|
Call |
Call(Position pos,
java.lang.String name,
Expr a1)
|
Call |
Call(Position pos,
java.lang.String name,
Expr a1,
Expr a2)
|
Call |
Call(Position pos,
java.lang.String name,
Expr a1,
Expr a2,
Expr a3)
|
Call |
Call(Position pos,
java.lang.String name,
Expr a1,
Expr a2,
Expr a3,
Expr a4)
|
Call |
Call(Position pos,
java.lang.String name,
java.util.List args)
|
CanonicalTypeNode |
CanonicalTypeNode(Position pos,
Type type)
|
Case |
Case(Position pos,
Expr expr)
|
Cast |
Cast(Position pos,
TypeNode type,
Expr expr)
|
Catch |
Catch(Position pos,
Formal formal,
Block body)
|
CharLit |
CharLit(Position pos,
char value)
|
ClassBody |
ClassBody(Position pos,
java.util.List members)
|
ClassDecl |
ClassDecl(Position pos,
Flags flags,
java.lang.String name,
TypeNode superClass,
java.util.List interfaces,
ClassBody body)
|
ClassLit |
ClassLit(Position pos,
TypeNode typeNode)
|
Conditional |
Conditional(Position pos,
Expr cond,
Expr consequent,
Expr alternative)
|
ConstructorCall |
ConstructorCall(Position pos,
ConstructorCall.Kind kind,
Expr outer,
java.util.List args)
|
ConstructorCall |
ConstructorCall(Position pos,
ConstructorCall.Kind kind,
java.util.List args)
|
ConstructorDecl |
ConstructorDecl(Position pos,
Flags flags,
java.lang.String name,
java.util.List formals,
java.util.List throwTypes,
Block body)
|
Branch |
Continue(Position pos)
|
Branch |
Continue(Position pos,
java.lang.String label)
|
Case |
Default(Position pos)
|
Disamb |
disamb()
Returns a disambiguator for nodes from this factory. |
Do |
Do(Position pos,
Stmt body,
Expr cond)
|
Empty |
Empty(Position pos)
|
Eval |
Eval(Position pos,
Expr expr)
|
Field |
Field(Position pos,
Receiver target,
java.lang.String name)
|
Field |
Field(Position pos,
java.lang.String name)
|
FieldAssign |
FieldAssign(Position pos,
Field target,
Assign.Operator op,
Expr source)
|
FieldDecl |
FieldDecl(Position pos,
Flags flags,
TypeNode type,
java.lang.String name)
|
FieldDecl |
FieldDecl(Position pos,
Flags flags,
TypeNode type,
java.lang.String name,
Expr init)
|
FloatLit |
FloatLit(Position pos,
FloatLit.Kind kind,
double value)
|
For |
For(Position pos,
java.util.List inits,
Expr cond,
java.util.List iters,
Stmt body)
|
Formal |
Formal(Position pos,
Flags flags,
TypeNode type,
java.lang.String name)
|
If |
If(Position pos,
Expr cond,
Stmt consequent)
|
If |
If(Position pos,
Expr cond,
Stmt consequent,
Stmt alternative)
|
Import |
Import(Position pos,
Import.Kind kind,
java.lang.String name)
|
Initializer |
Initializer(Position pos,
Flags flags,
Block body)
|
Instanceof |
Instanceof(Position pos,
Expr expr,
TypeNode type)
|
IntLit |
IntLit(Position pos,
IntLit.Kind kind,
long value)
|
Labeled |
Labeled(Position pos,
java.lang.String label,
Stmt body)
|
Local |
Local(Position pos,
java.lang.String name)
|
LocalAssign |
LocalAssign(Position pos,
Local target,
Assign.Operator op,
Expr source)
|
LocalClassDecl |
LocalClassDecl(Position pos,
ClassDecl decl)
|
LocalDecl |
LocalDecl(Position pos,
Flags flags,
TypeNode type,
java.lang.String name)
|
LocalDecl |
LocalDecl(Position pos,
Flags flags,
TypeNode type,
java.lang.String name,
Expr init)
|
MethodDecl |
MethodDecl(Position pos,
Flags flags,
TypeNode returnType,
java.lang.String name,
java.util.List formals,
java.util.List throwTypes,
Block body)
|
New |
New(Position pos,
Expr outer,
TypeNode objectType,
java.util.List args)
|
New |
New(Position pos,
Expr outer,
TypeNode objectType,
java.util.List args,
ClassBody body)
|
New |
New(Position pos,
TypeNode type,
java.util.List args)
|
New |
New(Position pos,
TypeNode type,
java.util.List args,
ClassBody body)
|
NewArray |
NewArray(Position pos,
TypeNode base,
int addDims,
ArrayInit init)
|
NewArray |
NewArray(Position pos,
TypeNode base,
java.util.List dims)
|
NewArray |
NewArray(Position pos,
TypeNode base,
java.util.List dims,
int addDims)
|
NewArray |
NewArray(Position pos,
TypeNode base,
java.util.List dims,
int addDims,
ArrayInit init)
|
NullLit |
NullLit(Position pos)
|
PackageNode |
PackageNode(Position pos,
Package p)
|
Return |
Return(Position pos)
|
Return |
Return(Position pos,
Expr expr)
|
SourceCollection |
SourceCollection(Position pos,
java.util.List sources)
|
SourceFile |
SourceFile(Position pos,
java.util.List decls)
|
SourceFile |
SourceFile(Position pos,
java.util.List imports,
java.util.List decls)
|
SourceFile |
SourceFile(Position pos,
PackageNode packageName,
java.util.List imports,
java.util.List decls)
|
Special |
Special(Position pos,
Special.Kind kind)
|
Special |
Special(Position pos,
Special.Kind kind,
TypeNode outer)
|
StringLit |
StringLit(Position pos,
java.lang.String value)
|
Special |
Super(Position pos)
|
Special |
Super(Position pos,
TypeNode outer)
|
ConstructorCall |
SuperCall(Position pos,
Expr outer,
java.util.List args)
|
ConstructorCall |
SuperCall(Position pos,
java.util.List args)
|
Switch |
Switch(Position pos,
Expr expr,
java.util.List elements)
|
SwitchBlock |
SwitchBlock(Position pos,
java.util.List statements)
|
Synchronized |
Synchronized(Position pos,
Expr expr,
Block body)
|
Special |
This(Position pos)
|
Special |
This(Position pos,
TypeNode outer)
|
ConstructorCall |
ThisCall(Position pos,
Expr outer,
java.util.List args)
|
ConstructorCall |
ThisCall(Position pos,
java.util.List args)
|
Throw |
Throw(Position pos,
Expr expr)
|
Try |
Try(Position pos,
Block tryBlock,
java.util.List catchBlocks)
|
Try |
Try(Position pos,
Block tryBlock,
java.util.List catchBlocks,
Block finallyBlock)
|
Unary |
Unary(Position pos,
Expr expr,
Unary.Operator op)
|
Unary |
Unary(Position pos,
Unary.Operator op,
Expr expr)
|
While |
While(Position pos,
Expr cond,
Stmt body)
|
disamb
Disamb disamb()
- Returns a disambiguator for nodes from this factory.
AmbExpr
AmbExpr AmbExpr(Position pos,
java.lang.String name)
AmbReceiver
AmbReceiver AmbReceiver(Position pos,
java.lang.String name)
AmbReceiver
AmbReceiver AmbReceiver(Position pos,
Prefix prefix,
java.lang.String name)
AmbQualifierNode
AmbQualifierNode AmbQualifierNode(Position pos,
java.lang.String name)
AmbQualifierNode
AmbQualifierNode AmbQualifierNode(Position pos,
QualifierNode qual,
java.lang.String name)
AmbPrefix
AmbPrefix AmbPrefix(Position pos,
java.lang.String name)
AmbPrefix
AmbPrefix AmbPrefix(Position pos,
Prefix prefix,
java.lang.String name)
AmbTypeNode
AmbTypeNode AmbTypeNode(Position pos,
java.lang.String name)
AmbTypeNode
AmbTypeNode AmbTypeNode(Position pos,
QualifierNode qualifier,
java.lang.String name)
ArrayTypeNode
ArrayTypeNode ArrayTypeNode(Position pos,
TypeNode base)
CanonicalTypeNode
CanonicalTypeNode CanonicalTypeNode(Position pos,
Type type)
ArrayAccess
ArrayAccess ArrayAccess(Position pos,
Expr base,
Expr index)
ArrayInit
ArrayInit ArrayInit(Position pos)
ArrayInit
ArrayInit ArrayInit(Position pos,
java.util.List elements)
Assert
Assert Assert(Position pos,
Expr cond)
Assert
Assert Assert(Position pos,
Expr cond,
Expr errorMessage)
Assign
Assign Assign(Position pos,
Expr target,
Assign.Operator op,
Expr source)
LocalAssign
LocalAssign LocalAssign(Position pos,
Local target,
Assign.Operator op,
Expr source)
FieldAssign
FieldAssign FieldAssign(Position pos,
Field target,
Assign.Operator op,
Expr source)
ArrayAccessAssign
ArrayAccessAssign ArrayAccessAssign(Position pos,
ArrayAccess target,
Assign.Operator op,
Expr source)
AmbAssign
AmbAssign AmbAssign(Position pos,
Expr target,
Assign.Operator op,
Expr source)
Binary
Binary Binary(Position pos,
Expr left,
Binary.Operator op,
Expr right)
Block
Block Block(Position pos)
Block
Block Block(Position pos,
Stmt s1)
Block
Block Block(Position pos,
Stmt s1,
Stmt s2)
Block
Block Block(Position pos,
Stmt s1,
Stmt s2,
Stmt s3)
Block
Block Block(Position pos,
Stmt s1,
Stmt s2,
Stmt s3,
Stmt s4)
Block
Block Block(Position pos,
java.util.List statements)
SwitchBlock
SwitchBlock SwitchBlock(Position pos,
java.util.List statements)
BooleanLit
BooleanLit BooleanLit(Position pos,
boolean value)
Break
Branch Break(Position pos)
Break
Branch Break(Position pos,
java.lang.String label)
Continue
Branch Continue(Position pos)
Continue
Branch Continue(Position pos,
java.lang.String label)
Branch
Branch Branch(Position pos,
Branch.Kind kind)
Branch
Branch Branch(Position pos,
Branch.Kind kind,
java.lang.String label)
Call
Call Call(Position pos,
java.lang.String name)
Call
Call Call(Position pos,
java.lang.String name,
Expr a1)
Call
Call Call(Position pos,
java.lang.String name,
Expr a1,
Expr a2)
Call
Call Call(Position pos,
java.lang.String name,
Expr a1,
Expr a2,
Expr a3)
Call
Call Call(Position pos,
java.lang.String name,
Expr a1,
Expr a2,
Expr a3,
Expr a4)
Call
Call Call(Position pos,
java.lang.String name,
java.util.List args)
Call
Call Call(Position pos,
Receiver target,
java.lang.String name)
Call
Call Call(Position pos,
Receiver target,
java.lang.String name,
Expr a1)
Call
Call Call(Position pos,
Receiver target,
java.lang.String name,
Expr a1,
Expr a2)
Call
Call Call(Position pos,
Receiver target,
java.lang.String name,
Expr a1,
Expr a2,
Expr a3)
Call
Call Call(Position pos,
Receiver target,
java.lang.String name,
Expr a1,
Expr a2,
Expr a3,
Expr a4)
Call
Call Call(Position pos,
Receiver target,
java.lang.String name,
java.util.List args)
Default
Case Default(Position pos)
Case
Case Case(Position pos,
Expr expr)
Cast
Cast Cast(Position pos,
TypeNode type,
Expr expr)
Catch
Catch Catch(Position pos,
Formal formal,
Block body)
CharLit
CharLit CharLit(Position pos,
char value)
ClassBody
ClassBody ClassBody(Position pos,
java.util.List members)
ClassDecl
ClassDecl ClassDecl(Position pos,
Flags flags,
java.lang.String name,
TypeNode superClass,
java.util.List interfaces,
ClassBody body)
ClassLit
ClassLit ClassLit(Position pos,
TypeNode typeNode)
Conditional
Conditional Conditional(Position pos,
Expr cond,
Expr consequent,
Expr alternative)
ThisCall
ConstructorCall ThisCall(Position pos,
java.util.List args)
ThisCall
ConstructorCall ThisCall(Position pos,
Expr outer,
java.util.List args)
SuperCall
ConstructorCall SuperCall(Position pos,
java.util.List args)
SuperCall
ConstructorCall SuperCall(Position pos,
Expr outer,
java.util.List args)
ConstructorCall
ConstructorCall ConstructorCall(Position pos,
ConstructorCall.Kind kind,
java.util.List args)
ConstructorCall
ConstructorCall ConstructorCall(Position pos,
ConstructorCall.Kind kind,
Expr outer,
java.util.List args)
ConstructorDecl
ConstructorDecl ConstructorDecl(Position pos,
Flags flags,
java.lang.String name,
java.util.List formals,
java.util.List throwTypes,
Block body)
FieldDecl
FieldDecl FieldDecl(Position pos,
Flags flags,
TypeNode type,
java.lang.String name)
FieldDecl
FieldDecl FieldDecl(Position pos,
Flags flags,
TypeNode type,
java.lang.String name,
Expr init)
Do
Do Do(Position pos,
Stmt body,
Expr cond)
Empty
Empty Empty(Position pos)
Eval
Eval Eval(Position pos,
Expr expr)
Field
Field Field(Position pos,
java.lang.String name)
Field
Field Field(Position pos,
Receiver target,
java.lang.String name)
FloatLit
FloatLit FloatLit(Position pos,
FloatLit.Kind kind,
double value)
For
For For(Position pos,
java.util.List inits,
Expr cond,
java.util.List iters,
Stmt body)
Formal
Formal Formal(Position pos,
Flags flags,
TypeNode type,
java.lang.String name)
If
If If(Position pos,
Expr cond,
Stmt consequent)
If
If If(Position pos,
Expr cond,
Stmt consequent,
Stmt alternative)
Import
Import Import(Position pos,
Import.Kind kind,
java.lang.String name)
Initializer
Initializer Initializer(Position pos,
Flags flags,
Block body)
Instanceof
Instanceof Instanceof(Position pos,
Expr expr,
TypeNode type)
IntLit
IntLit IntLit(Position pos,
IntLit.Kind kind,
long value)
Labeled
Labeled Labeled(Position pos,
java.lang.String label,
Stmt body)
Local
Local Local(Position pos,
java.lang.String name)
LocalClassDecl
LocalClassDecl LocalClassDecl(Position pos,
ClassDecl decl)
LocalDecl
LocalDecl LocalDecl(Position pos,
Flags flags,
TypeNode type,
java.lang.String name)
LocalDecl
LocalDecl LocalDecl(Position pos,
Flags flags,
TypeNode type,
java.lang.String name,
Expr init)
MethodDecl
MethodDecl MethodDecl(Position pos,
Flags flags,
TypeNode returnType,
java.lang.String name,
java.util.List formals,
java.util.List throwTypes,
Block body)
New
New New(Position pos,
TypeNode type,
java.util.List args)
New
New New(Position pos,
TypeNode type,
java.util.List args,
ClassBody body)
New
New New(Position pos,
Expr outer,
TypeNode objectType,
java.util.List args)
New
New New(Position pos,
Expr outer,
TypeNode objectType,
java.util.List args,
ClassBody body)
NewArray
NewArray NewArray(Position pos,
TypeNode base,
java.util.List dims)
NewArray
NewArray NewArray(Position pos,
TypeNode base,
java.util.List dims,
int addDims)
NewArray
NewArray NewArray(Position pos,
TypeNode base,
int addDims,
ArrayInit init)
NewArray
NewArray NewArray(Position pos,
TypeNode base,
java.util.List dims,
int addDims,
ArrayInit init)
NullLit
NullLit NullLit(Position pos)
Return
Return Return(Position pos)
Return
Return Return(Position pos,
Expr expr)
SourceCollection
SourceCollection SourceCollection(Position pos,
java.util.List sources)
SourceFile
SourceFile SourceFile(Position pos,
java.util.List decls)
SourceFile
SourceFile SourceFile(Position pos,
java.util.List imports,
java.util.List decls)
SourceFile
SourceFile SourceFile(Position pos,
PackageNode packageName,
java.util.List imports,
java.util.List decls)
This
Special This(Position pos)
This
Special This(Position pos,
TypeNode outer)
Super
Special Super(Position pos)
Super
Special Super(Position pos,
TypeNode outer)
Special
Special Special(Position pos,
Special.Kind kind)
Special
Special Special(Position pos,
Special.Kind kind,
TypeNode outer)
StringLit
StringLit StringLit(Position pos,
java.lang.String value)
Switch
Switch Switch(Position pos,
Expr expr,
java.util.List elements)
Synchronized
Synchronized Synchronized(Position pos,
Expr expr,
Block body)
Throw
Throw Throw(Position pos,
Expr expr)
Try
Try Try(Position pos,
Block tryBlock,
java.util.List catchBlocks)
Try
Try Try(Position pos,
Block tryBlock,
java.util.List catchBlocks,
Block finallyBlock)
PackageNode
PackageNode PackageNode(Position pos,
Package p)
Unary
Unary Unary(Position pos,
Unary.Operator op,
Expr expr)
Unary
Unary Unary(Position pos,
Expr expr,
Unary.Operator op)
While
While While(Position pos,
Expr cond,
Stmt body)