public abstract class AbstractLexerBasedConverter<T> extends AbstractValueConverter<T> implements IValueConverter.RuleSpecific
IValueConverter.RuleSpecific
NO_OP_CONVERTER
Constructor and Description |
---|
AbstractLexerBasedConverter() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertTokens(T value,
java.lang.String result) |
protected void |
assertTokens(T value,
org.antlr.runtime.TokenSource tokenSource,
java.lang.String escapedString) |
protected void |
assertValidValue(T value) |
protected ValueConverterException |
createTokenContentMismatchException(T value,
java.lang.String escapedString,
org.antlr.runtime.Token token) |
protected ValueConverterException |
createTokenTypeMismatchException(T value,
java.lang.String escapedString,
org.antlr.runtime.Token token) |
protected Lexer |
getLexer() |
protected com.google.inject.Provider<Lexer> |
getLexerProvider() |
protected AbstractRule |
getRule() |
protected java.lang.String |
getRuleName() |
protected java.lang.String |
getRuleName(org.antlr.runtime.Token token) |
protected java.util.Map<java.lang.Integer,java.lang.String> |
getTokenDefMap() |
protected ITokenDefProvider |
getTokenDefProvider() |
protected org.antlr.runtime.TokenSource |
getTokenSource(java.lang.String escapedValue) |
void |
setLexerProvider(com.google.inject.Provider<Lexer> lexerProvider) |
void |
setRule(AbstractRule rule) |
void |
setTokenDefProvider(ITokenDefProvider tokenDefProvider) |
protected java.lang.String |
toEscapedString(T value) |
java.lang.String |
toString(T value)
Transforms the given value to a string that is conformant to the expected
terminal or data type rule.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toValue
public java.lang.String toString(T value)
IValueConverter
toString
in interface IValueConverter<T>
value
- the to-be-transformed valueprotected void assertTokens(T value, java.lang.String result)
protected void assertTokens(T value, org.antlr.runtime.TokenSource tokenSource, java.lang.String escapedString)
protected ValueConverterException createTokenTypeMismatchException(T value, java.lang.String escapedString, org.antlr.runtime.Token token)
protected ValueConverterException createTokenContentMismatchException(T value, java.lang.String escapedString, org.antlr.runtime.Token token)
protected org.antlr.runtime.TokenSource getTokenSource(java.lang.String escapedValue)
protected void assertValidValue(T value)
protected java.lang.String getRuleName()
protected java.lang.String toEscapedString(T value)
protected Lexer getLexer()
protected java.lang.String getRuleName(org.antlr.runtime.Token token)
protected java.util.Map<java.lang.Integer,java.lang.String> getTokenDefMap()
protected AbstractRule getRule()
public void setRule(AbstractRule rule)
setRule
in interface IValueConverter.RuleSpecific
public void setLexerProvider(com.google.inject.Provider<Lexer> lexerProvider)
public void setTokenDefProvider(ITokenDefProvider tokenDefProvider)
protected ITokenDefProvider getTokenDefProvider()
protected com.google.inject.Provider<Lexer> getLexerProvider()