polyglot.ext.jl.ast
Class Ext_c

java.lang.Object
  extended by polyglot.ext.jl.ast.Ext_c
All Implemented Interfaces:
java.lang.Cloneable, Ext, Copy
Direct Known Subclasses:
CofferExt_c, JL_c, PaoExt_c

public abstract class Ext_c
extends java.lang.Object
implements Ext

Ext is the super type of all node extension objects. It contains a pointer back to the node it is extending and a possibly-null pointer to another extension node.


Field Summary
protected  Ext ext
           
protected  Node node
           
 
Constructor Summary
Ext_c()
           
Ext_c(Ext ext)
           
 
Method Summary
 java.lang.Object copy()
          Copy the extension.
 void dump(CodeWriter w)
          Dump the AST node for debugging purposes.
 Ext ext()
          Return our extension object, or null.
 Ext ext(Ext ext)
          Set the extension of this extension.
 void init(Node node)
          Initialize the extension object's pointer back to the node.
 Node node()
          Return the node we ultimately extend.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

node

protected Node node

ext

protected Ext ext
Constructor Detail

Ext_c

public Ext_c(Ext ext)

Ext_c

public Ext_c()
Method Detail

init

public void init(Node node)
Initialize the extension object's pointer back to the node. This also initializes the back pointers for all extensions of the extension.

Specified by:
init in interface Ext

node

public Node node()
Return the node we ultimately extend.

Specified by:
node in interface Ext

ext

public Ext ext()
Return our extension object, or null.

Specified by:
ext in interface Ext

ext

public Ext ext(Ext ext)
Description copied from interface: Ext
Set the extension of this extension.

Specified by:
ext in interface Ext

copy

public java.lang.Object copy()
Copy the extension.

Specified by:
copy in interface Copy

toString

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

dump

public void dump(CodeWriter w)
Dump the AST node for debugging purposes.

Specified by:
dump in interface Ext