org.unitils.dbmaintainer.script.parsingstate.impl
Class InLineCommentParsingState
java.lang.Object
org.unitils.dbmaintainer.script.parsingstate.impl.BaseParsingState
org.unitils.dbmaintainer.script.parsingstate.impl.InLineCommentParsingState
- All Implemented Interfaces:
- ParsingState
public class InLineCommentParsingState
- extends BaseParsingState
A state for parsing an in-line comment (-- comment) part of a script.
- Author:
- Tim Ducheyne, Filip Neven
Method Summary |
protected ParsingState |
getNextParsingState(char previousChar,
char currentChar,
char nextChar,
StatementBuilder statementBuilder)
Determines whether the end of the line comment is reached. |
void |
init(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 |
normalParsingState
protected ParsingState normalParsingState
- The normal parsing state, that should be returned when the comment end is reached.
InLineCommentParsingState
public InLineCommentParsingState()
init
public void init(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
protected ParsingState getNextParsingState(char previousChar,
char currentChar,
char nextChar,
StatementBuilder statementBuilder)
- Determines whether the end of the line comment is reached.
If that is the case, the normal parsing state is returned.
- Specified by:
getNextParsingState
in class BaseParsingState
- Parameters:
previousChar
- The previous char, 0 if nonecurrentChar
- The current charnextChar
- The next char, 0 if nonestatementBuilder
- The statement builder, not null
- Returns:
- The next parsing state, null if the end of the statement is reached
Copyright © 2011. All Rights Reserved.