org.prorefactor.refactor.source
Class ConditionalExpansion

java.lang.Object
  extended by org.prorefactor.refactor.source.Expansion
      extended by org.prorefactor.refactor.source.ConditionalExpansion
All Implemented Interfaces:
TETNode

public class ConditionalExpansion
extends Expansion

Represents an &IF..&THEN and its code, an &ELSEIF..&THEN and its code, or an &ELSEIF and its code. This might seem backwards, but the "parent" token is the &ENDIF.


Method Summary
 Token getFirstCondToken()
          The first "condition" token: &IF, &ELSEIF, or &ELSE.
 Token getFirstProperToken()
          The first "proper" token - the first token to come after the condition.
 java.io.File nearestEnclosingFile()
          Find the nearest enclosing File, ignoring that the *actual* text for the Token may have come from a Declaration some number of layers higher.
 void setFirstCondToken(Token token)
           
 void setFirstProperToken(Token token)
           
 java.lang.String toStringSub()
          Use this method to display the subclass's attributes in XML subnode text (will be subnodes of an node).
 
Methods inherited from class org.prorefactor.refactor.source.Expansion
getDerivation, getFirstToken, isParsed, isPrimary, setParsed, setPrimary, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

nearestEnclosingFile

public java.io.File nearestEnclosingFile()
Description copied from interface: TETNode
Find the nearest enclosing File, ignoring that the *actual* text for the Token may have come from a Declaration some number of layers higher. Useful for reporting errors.


toStringSub

public java.lang.String toStringSub()
Description copied from class: Expansion
Use this method to display the subclass's attributes in XML subnode text (will be subnodes of an node).

Specified by:
toStringSub in class Expansion

getFirstCondToken

public Token getFirstCondToken()
The first "condition" token: &IF, &ELSEIF, or &ELSE. The rest of the tokens in this chain are the rest of the conditions' text.


getFirstProperToken

public Token getFirstProperToken()
The first "proper" token - the first token to come after the condition.


setFirstCondToken

public void setFirstCondToken(Token token)
See Also:
getFirstCondToken()

setFirstProperToken

public void setFirstProperToken(Token token)
See Also:
getFirstProperToken()


Copyright © 2008 Joanju Software. All Rights Reserved.