public class EnumLexer extends AbstractLexer
Constructor and Description |
---|
EnumLexer() |
Modifier and Type | Method and Description |
---|---|
String |
getEnumProperty() |
Class<? extends Enum<?>> |
getFromEnum() |
LexerParser |
getParser(LexerParser parent)
Returns a parser which is able to handles the text relative to this lexer
|
Set<String> |
getPossibleValues() |
Class<?> |
getType() |
boolean |
isOrdered() |
LexerMatcher |
resolveStart(LexerParser lexerParser)
Resolves the start matcher for this lexer.
|
Class<?> |
resolveType(Grammar grammar)
Resolves the type of the object parsed by this lexer.
|
void |
setEnumProperty(String enumProperty) |
void |
setFromEnum(Class<? extends Enum<?>> fromEnum) |
void |
setPossibleValues(Set<String> possibleValues) |
void |
setType(Class<?> type) |
void |
validate(Grammar grammar)
Default implementation does nothing.
|
equals, getDslDoc, getEnd, getId, getListener, getListenerClass, getMatcherAutoCompleteConfiguration, getStart, hashCode, isRoot, isRootOnly, resolveEnd, setDslDoc, setEnd, setId, setListenerClass, setMatcherAutoCompleteConfiguration, setRoot, setRootOnly, setStart, toString
public boolean isOrdered()
public Class<?> resolveType(Grammar grammar)
Lexer
public void validate(Grammar grammar) throws DslException
AbstractLexer
validate
in interface Lexer
validate
in class AbstractLexer
grammar
- Related grammarDslException
public LexerMatcher resolveStart(LexerParser lexerParser) throws DslException
Lexer
resolveStart
in interface Lexer
resolveStart
in class AbstractLexer
DslException
LexerParser.resolveStart()
public LexerParser getParser(LexerParser parent) throws DslException
Lexer
parent
- Parent parserDslException
public Class<?> getType()
public void setType(Class<?> type)
public String getEnumProperty()
public void setEnumProperty(String enumProperty)