polyglot.ext.jl.ast
Class SwitchBlock_c

java.lang.Object
  extended bypolyglot.ext.jl.ast.Node_c
      extended bypolyglot.ext.jl.ast.Term_c
          extended bypolyglot.ext.jl.ast.Stmt_c
              extended bypolyglot.ext.jl.ast.AbstractBlock_c
                  extended bypolyglot.ext.jl.ast.SwitchBlock_c
All Implemented Interfaces:
Block, java.lang.Cloneable, CompoundStmt, Copy, JL, Node, NodeOps, Stmt, SwitchBlock, SwitchElement, Term

public class SwitchBlock_c
extends AbstractBlock_c
implements SwitchBlock

A SwitchBlock is a list of statements within a switch.


Field Summary
 
Fields inherited from class polyglot.ext.jl.ast.AbstractBlock_c
statements
 
Fields inherited from class polyglot.ext.jl.ast.Term_c
reachable
 
Fields inherited from class polyglot.ext.jl.ast.Node_c
del, ext, position
 
Constructor Summary
SwitchBlock_c(Position pos, java.util.List statements)
           
 
Method Summary
 Context enterScope(Context c)
          A SwitchBlock differs from a normal block in that declarations made in the context of the switch block are in the scope following the switch block.
 
Methods inherited from class polyglot.ext.jl.ast.AbstractBlock_c
acceptCFG, append, entry, prepend, prettyPrint, reconstruct, statements, statements, toString, visitChildren
 
Methods inherited from class polyglot.ext.jl.ast.Term_c
listEntry, reachable, reachable
 
Methods inherited from class polyglot.ext.jl.ast.Node_c
addDecls, addMembers, addMembersEnter, addMembersOverride, buildTypes, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, enterScope, exceptionCheck, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, reachable, reachable
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 
Methods inherited from interface polyglot.ast.Block
append, prepend, statements, statements
 

Constructor Detail

SwitchBlock_c

public SwitchBlock_c(Position pos,
                     java.util.List statements)
Method Detail

enterScope

public Context enterScope(Context c)
A SwitchBlock differs from a normal block in that declarations made in the context of the switch block are in the scope following the switch block. For example
 switch (i) { 
     case 0: 
       int i = 4; 
     case 1: 
       // i is in scope, but may not have been initialized.
     ...
 } 
 

Specified by:
enterScope in interface NodeOps
Overrides:
enterScope in class AbstractBlock_c