polyglot.ext.pao.extension
Class PaoInstanceofExt_c

java.lang.Object
  extended by polyglot.ext.jl.ast.Ext_c
      extended by polyglot.ext.pao.extension.PaoExt_c
          extended by polyglot.ext.pao.extension.PaoInstanceofExt_c
All Implemented Interfaces:
java.lang.Cloneable, Ext, PaoExt, Copy

public class PaoInstanceofExt_c
extends PaoExt_c

The PaoExt implementation for the InstanceOf AST node.


Field Summary
 
Fields inherited from class polyglot.ext.jl.ast.Ext_c
ext, node
 
Constructor Summary
PaoInstanceofExt_c()
           
 
Method Summary
 Node rewrite(PaoTypeSystem ts, NodeFactory nf)
          Rewrites instanceof checks where the comparison type is a primitive type to use the boxed type instead.
 
Methods inherited from class polyglot.ext.jl.ast.Ext_c
copy, dump, ext, ext, init, node, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface polyglot.ast.Ext
dump, ext, ext, init, node
 
Methods inherited from interface polyglot.util.Copy
copy
 

Constructor Detail

PaoInstanceofExt_c

public PaoInstanceofExt_c()
Method Detail

rewrite

public Node rewrite(PaoTypeSystem ts,
                    NodeFactory nf)
Rewrites instanceof checks where the comparison type is a primitive type to use the boxed type instead. For example, "e instanceof int" gets rewritten to "e instanceof polyglot.ext.pao.runtime.Integer".

Specified by:
rewrite in interface PaoExt
Overrides:
rewrite in class PaoExt_c
Parameters:
ts - The PaoTypeSystem instance.
nf - The NodeFactory instance.
Returns:
the result of rewriting the AST node to provide boxing and unboxing.
See Also:
PaoExt.rewrite(PaoTypeSystem, NodeFactory)