com.google.caja.parser.js
Class SwitchCase

java.lang.Object
  extended by com.google.caja.parser.AbstractParseTreeNode
      extended by com.google.caja.parser.js.AbstractStatement
          extended by com.google.caja.parser.js.SwitchCase
All Implemented Interfaces:
JsonMLCompatible, Statement, MutableParseTreeNode, ParseTreeNode, MessagePart, Renderable, java.lang.Cloneable
Direct Known Subclasses:
CaseStmt, DefaultCaseStmt

public abstract class SwitchCase
extends AbstractStatement

Base class for case and default blocks.

See Also:
SwitchStmt

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.google.caja.parser.ParseTreeNode
ParseTreeNode.ReflectiveCtor
 
Nested classes/interfaces inherited from interface com.google.caja.reporting.MessagePart
MessagePart.Factory
 
Nested classes/interfaces inherited from interface com.google.caja.parser.js.JsonMLCompatible
JsonMLCompatible.JsonMLBuilder
 
Nested classes/interfaces inherited from interface com.google.caja.parser.MutableParseTreeNode
MutableParseTreeNode.Mutation
 
Field Summary
 
Fields inherited from interface com.google.caja.parser.ParseTreeNode
TAINTED
 
Constructor Summary
protected SwitchCase(FilePosition pos)
           
 
Method Summary
abstract  Block getBody()
           
 boolean hasHangingConditional()
          True if the rendered form of the statement would consume more tokens if parsed followed by the tokens "else" and ";".
 void render(RenderContext rc)
          Output the textual form to r.getOut().
protected abstract  void renderHead(RenderContext rc)
           
 
Methods inherited from class com.google.caja.parser.js.AbstractStatement
breaks, continues, isTerminal, makeRenderer, renderBlock
 
Methods inherited from class com.google.caja.parser.AbstractParseTreeNode
acceptPostOrder, acceptPreOrder, appendChild, children, childrenAs, childrenChanged, childrenPart, clone, createMutation, equals, format, formatSelf, formatTree, formatTree, getAttributes, getComments, getFilePosition, getValue, hashCode, insertBefore, removeChild, replaceChild, setComments, setFilePosition, toString, toStringDeep, toStringDeep
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.caja.parser.ParseTreeNode
acceptPostOrder, acceptPreOrder, children, clone, formatTree, getAttributes, getComments, getFilePosition, getValue
 
Methods inherited from interface com.google.caja.reporting.MessagePart
format
 
Methods inherited from interface com.google.caja.parser.js.JsonMLCompatible
toJsonML
 

Constructor Detail

SwitchCase

protected SwitchCase(FilePosition pos)
Method Detail

hasHangingConditional

public boolean hasHangingConditional()
Description copied from interface: Statement
True if the rendered form of the statement would consume more tokens if parsed followed by the tokens "else" and ";".


getBody

public abstract Block getBody()

renderHead

protected abstract void renderHead(RenderContext rc)

render

public final void render(RenderContext rc)
Description copied from interface: Renderable
Output the textual form to r.getOut().



Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0