org.dbmaintain.script.parser.parsingstate.impl
Class EscapingParsingState

java.lang.Object
  extended by org.dbmaintain.script.parser.parsingstate.impl.EscapingParsingState
All Implemented Interfaces:
ParsingState

public class EscapingParsingState
extends Object
implements ParsingState

Author:
Filip Neven, Tim Ducheyne

Field Summary
protected  HandleNextCharacterResult backToNormalResult
          The normal parsing state, that should be returned immediately (only one character is escaped).
 
Constructor Summary
EscapingParsingState()
           
 
Method Summary
 HandleNextCharacterResult getNextParsingState(Character previousChar, Character currentChar, Character nextChar, StatementBuilder statementBuilder)
          Calculates the next parsing state from the given characters and the statement being built
 void linkParsingStates(ParsingState normalParsingState)
          Initializes the state with the normal parsing state, that should be returned when the comment end is reached..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backToNormalResult

protected HandleNextCharacterResult backToNormalResult
The normal parsing state, that should be returned immediately (only one character is escaped).

Constructor Detail

EscapingParsingState

public EscapingParsingState()
Method Detail

linkParsingStates

public void linkParsingStates(ParsingState normalParsingState)
Initializes the state with the normal parsing state, that should be returned when the comment end is reached..

Parameters:
normalParsingState - The normal state, not null

getNextParsingState

public HandleNextCharacterResult getNextParsingState(Character previousChar,
                                                     Character currentChar,
                                                     Character nextChar,
                                                     StatementBuilder statementBuilder)
Description copied from interface: ParsingState
Calculates the next parsing state from the given characters and the statement being built

Specified by:
getNextParsingState in interface ParsingState
Parameters:
previousChar - the previous char, null if none
currentChar - the current char
nextChar - the next char, null if none
statementBuilder - The statement builder, not null
Returns:
the next parsing state, null if the end of the statement is reached


Copyright © 2011. All Rights Reserved.