Class GlueTypeParser
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.metadata.glue.GlueTypeParser
-
public class GlueTypeParser extends Object
Parses Glue type definitions into tokenized form.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGlueTypeParser.Token
-
Field Summary
Fields Modifier and Type Field Description protected static CharacterESCAPE_CHARprotected static CharacterFIELD_DIVprotected static CharacterFIELD_ENDprotected static CharacterFIELD_PARAM_ENDprotected static CharacterFIELD_PARAM_STARTprotected static CharacterFIELD_SEPprotected static CharacterFIELD_START
-
Constructor Summary
Constructors Constructor Description GlueTypeParser(String input)Creates a new parser for the provided field type definition as a String.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GlueTypeParser.TokencurrentToken()Give the last Token returned by next()booleanhasNext()Does the parser have any more tokens.GlueTypeParser.Tokennext()Gets the next token.
-
-
-
Field Detail
-
FIELD_START
protected static final Character FIELD_START
-
FIELD_END
protected static final Character FIELD_END
-
FIELD_DIV
protected static final Character FIELD_DIV
-
FIELD_SEP
protected static final Character FIELD_SEP
-
ESCAPE_CHAR
protected static final Character ESCAPE_CHAR
-
FIELD_PARAM_START
protected static final Character FIELD_PARAM_START
-
FIELD_PARAM_END
protected static final Character FIELD_PARAM_END
-
-
Constructor Detail
-
GlueTypeParser
public GlueTypeParser(String input)
Creates a new parser for the provided field type definition as a String.- Parameters:
input- The string representation of the field type definition from Glue.
-
-
Method Detail
-
hasNext
public boolean hasNext()
Does the parser have any more tokens.- Returns:
- True if the parser may have additional tokens, False otherwise.
-
next
public GlueTypeParser.Token next()
Gets the next token.- Returns:
- The next token or null if no such Token exists.
-
currentToken
public GlueTypeParser.Token currentToken()
Give the last Token returned by next()- Returns:
- The Token.
-
-