Top Description Inners Fields Constructors Methods
org.h2.command

public abstract Class Token

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Known Direct Subclasses
org.h2.command.Token.IdentifierToken, org.h2.command.Token.KeywordToken, org.h2.command.Token.KeywordOrIdentifierToken, org.h2.command.Token.LiteralToken, org.h2.command.Token.ParameterToken, org.h2.command.Token.EndOfInputToken
Static Imports
org.h2.util.ParserUtil.IDENTIFIER, .ParserUtil.LAST_KEYWORD

Token.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv abstract static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv static final int
ASTERISK

The token "*".

pack-priv static final int
AT

The token "@".

pack-priv static final int
BIGGER

The token ">".

pack-priv static final int
BIGGER_EQUAL

The token ">=".

pack-priv static final int
CLOSE_BRACE

The token "}".

pack-priv static final int
CLOSE_BRACKET

The token "]".

pack-priv static final int
CLOSE_PAREN

The token ")".

pack-priv static final int
COLON

The token ":".

pack-priv static final int
COLON_COLON

The token "::".

pack-priv static final int
COLON_EQ

The token ":=".

pack-priv static final int
COMMA

The token ",".

pack-priv static final int
CONCATENATION

The token "||".

pack-priv static final int
DOT

The token ".".

pack-priv static final int
END_OF_INPUT

End of input.

pack-priv static final int
EQUAL

The token "=".

pack-priv static final int
LITERAL

Token with literal.

pack-priv static final int
MINUS_SIGN

The token "-".

pack-priv static final int
NOT_EQUAL

The token "<>" or "!=".

pack-priv static final int
NOT_TILDE

The token "!~".

pack-priv static final int
OPEN_BRACE

The token "{".

pack-priv static final int
OPEN_BRACKET

The token "[".

pack-priv static final int
OPEN_PAREN

The token "(".

pack-priv static final int
PARAMETER

Token with parameter.

pack-priv static final int
PERCENT

The token "%".

pack-priv static final int
PLUS_SIGN

The token "+".

pack-priv static final int
SEMICOLON

The token ";".

pack-priv static final int
SLASH

The token "/".

pack-priv static final int
SMALLER

The token "<".

pack-priv static final int
SMALLER_EQUAL

The token "<=".

pack-priv static final int
SPATIAL_INTERSECTS

The token "&&".

private int
pack-priv static final int
TILDE

The token "~".

pack-priv static final String[]

Constructor Summary

AccessConstructor and Description
pack-priv
Token(int start)

Method Summary

Modifier and TypeMethod and Description
pack-priv String
protected Token
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.

pack-priv void
convertUnicode(int uescape)

pack-priv boolean
pack-priv boolean
pack-priv final void
setStart(int offset)

pack-priv final int
pack-priv final void
subtractFromStart(int offset)

pack-priv abstract int
pack-priv Value
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ASTERISKback to summary
pack-priv static final int ASTERISK

The token "*".

ATback to summary
pack-priv static final int AT

The token "@".

BIGGERback to summary
pack-priv static final int BIGGER

The token ">".

BIGGER_EQUALback to summary
pack-priv static final int BIGGER_EQUAL

The token ">=".

CLOSE_BRACEback to summary
pack-priv static final int CLOSE_BRACE

The token "}".

CLOSE_BRACKETback to summary
pack-priv static final int CLOSE_BRACKET

The token "]".

CLOSE_PARENback to summary
pack-priv static final int CLOSE_PAREN

The token ")".

COLONback to summary
pack-priv static final int COLON

The token ":".

COLON_COLONback to summary
pack-priv static final int COLON_COLON

The token "::".

COLON_EQback to summary
pack-priv static final int COLON_EQ

The token ":=".

COMMAback to summary
pack-priv static final int COMMA

The token ",".

CONCATENATIONback to summary
pack-priv static final int CONCATENATION

The token "||".

DOTback to summary
pack-priv static final int DOT

The token ".".

END_OF_INPUTback to summary
pack-priv static final int END_OF_INPUT

End of input.

EQUALback to summary
pack-priv static final int EQUAL

The token "=".

LITERALback to summary
pack-priv static final int LITERAL

Token with literal.

MINUS_SIGNback to summary
pack-priv static final int MINUS_SIGN

The token "-".

NOT_EQUALback to summary
pack-priv static final int NOT_EQUAL

The token "<>" or "!=".

NOT_TILDEback to summary
pack-priv static final int NOT_TILDE

The token "!~".

OPEN_BRACEback to summary
pack-priv static final int OPEN_BRACE

The token "{".

OPEN_BRACKETback to summary
pack-priv static final int OPEN_BRACKET

The token "[".

OPEN_PARENback to summary
pack-priv static final int OPEN_PAREN

The token "(".

PARAMETERback to summary
pack-priv static final int PARAMETER

Token with parameter.

PERCENTback to summary
pack-priv static final int PERCENT

The token "%".

PLUS_SIGNback to summary
pack-priv static final int PLUS_SIGN

The token "+".

SEMICOLONback to summary
pack-priv static final int SEMICOLON

The token ";".

SLASHback to summary
pack-priv static final int SLASH

The token "/".

SMALLERback to summary
pack-priv static final int SMALLER

The token "<".

SMALLER_EQUALback to summary
pack-priv static final int SMALLER_EQUAL

The token "<=".

SPATIAL_INTERSECTSback to summary
pack-priv static final int SPATIAL_INTERSECTS

The token "&&".

startback to summary
private int start
TILDEback to summary
pack-priv static final int TILDE

The token "~".

TOKENSback to summary
pack-priv static final String[] TOKENS

Constructor Detail

Tokenback to summary
pack-priv Token(int start)

Method Detail

asIdentifierback to summary
pack-priv String asIdentifier()
cloneback to summary
protected Token clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:Token

a clone of this instance.

Annotations
@Override
convertUnicodeback to summary
pack-priv void convertUnicode(int uescape)
isQuotedback to summary
pack-priv boolean isQuoted()
needsUnicodeConversionback to summary
pack-priv boolean needsUnicodeConversion()
setStartback to summary
pack-priv final void setStart(int offset)
startback to summary
pack-priv final int start()
subtractFromStartback to summary
pack-priv final void subtractFromStart(int offset)
tokenTypeback to summary
pack-priv abstract int tokenType()
valueback to summary
pack-priv Value value(CastDataProvider provider)
org.h2.command back to summary

pack-priv final Class Token.BigintToken

extends LiteralToken
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final long
Inherited from org.h2.command.Token.LiteralToken:
value

Constructor Summary

AccessConstructor and Description
pack-priv
BigintToken(int start, long number)

Method Summary

Modifier and TypeMethod and Description
pack-priv Value
Inherited from org.h2.command.Token.LiteralToken:
tokenTypetoString

Field Detail

numberback to summary
private final long number

Constructor Detail

BigintTokenback to summary
pack-priv BigintToken(int start, long number)

Method Detail

valueback to summary
pack-priv Value value(CastDataProvider provider)

Overrides org.h2.command.Token.value.

Annotations
@Override
org.h2.command back to summary

pack-priv final Class Token.BinaryStringToken

extends LiteralToken
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final byte[]
Inherited from org.h2.command.Token.LiteralToken:
value

Constructor Summary

AccessConstructor and Description
pack-priv
BinaryStringToken(int start, byte[] string)

Method Summary

Modifier and TypeMethod and Description
pack-priv Value
Inherited from org.h2.command.Token.LiteralToken:
tokenTypetoString

Field Detail

stringback to summary
private final byte[] string

Constructor Detail

BinaryStringTokenback to summary
pack-priv BinaryStringToken(int start, byte[] string)

Method Detail

valueback to summary
pack-priv Value value(CastDataProvider provider)

Overrides org.h2.command.Token.value.

Annotations
@Override
org.h2.command back to summary

pack-priv final Class Token.CharacterStringToken

extends LiteralToken
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv String
private boolean
Inherited from org.h2.command.Token.LiteralToken:
value

Constructor Summary

AccessConstructor and Description
pack-priv
CharacterStringToken(int start, String string, boolean unicode)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv boolean
pack-priv Value
Inherited from org.h2.command.Token.LiteralToken:
tokenTypetoString

Field Detail

stringback to summary
pack-priv String string
unicodeback to summary
private boolean unicode

Constructor Detail

CharacterStringTokenback to summary
pack-priv CharacterStringToken(int start, String string, boolean unicode)

Method Detail

convertUnicodeback to summary
pack-priv void convertUnicode(int uescape)

Overrides org.h2.command.Token.convertUnicode.

Annotations
@Override
needsUnicodeConversionback to summary
pack-priv boolean needsUnicodeConversion()

Overrides org.h2.command.Token.needsUnicodeConversion.

Annotations
@Override
valueback to summary
pack-priv Value value(CastDataProvider provider)

Overrides org.h2.command.Token.value.

Annotations
@Override
org.h2.command back to summary

pack-priv final Class Token.EndOfInputToken

extends Token
Class Inheritance

Field Summary

Inherited from org.h2.command.Token:
ASTERISKATBIGGERBIGGER_EQUALCLOSE_BRACECLOSE_BRACKETCLOSE_PARENCOLONCOLON_COLONCOLON_EQCOMMACONCATENATIONDOTEND_OF_INPUTEQUALLITERALMINUS_SIGNNOT_EQUALNOT_TILDEOPEN_BRACEOPEN_BRACKETOPEN_PARENPARAMETERPERCENTPLUS_SIGNSEMICOLONSLASHSMALLERSMALLER_EQUALSPATIAL_INTERSECTSTILDETOKENS

Constructor Summary

AccessConstructor and Description
pack-priv
EndOfInputToken(int start)

Method Summary

Modifier and TypeMethod and Description
pack-priv int
Inherited from org.h2.command.Token:
asIdentifiercloneconvertUnicodeisQuotedneedsUnicodeConversionsetStartstartsubtractFromStartvalue

Constructor Detail

EndOfInputTokenback to summary
pack-priv EndOfInputToken(int start)

Method Detail

tokenTypeback to summary
pack-priv int tokenType()

Implements abstract org.h2.command.Token.tokenType.

Annotations
@Override
org.h2.command back to summary

pack-priv Class Token.IdentifierToken

extends Token
Class Inheritance

Field Summary

Modifier and TypeField and Description
private String
private final boolean
private boolean
Inherited from org.h2.command.Token:
ASTERISKATBIGGERBIGGER_EQUALCLOSE_BRACECLOSE_BRACKETCLOSE_PARENCOLONCOLON_COLONCOLON_EQCOMMACONCATENATIONDOTEND_OF_INPUTEQUALLITERALMINUS_SIGNNOT_EQUALNOT_TILDEOPEN_BRACEOPEN_BRACKETOPEN_PARENPARAMETERPERCENTPLUS_SIGNSEMICOLONSLASHSMALLERSMALLER_EQUALSPATIAL_INTERSECTSTILDETOKENS

Constructor Summary

AccessConstructor and Description
pack-priv
IdentifierToken(int start, String identifier, boolean quoted, boolean unicode)

Method Summary

Modifier and TypeMethod and Description
pack-priv String
pack-priv void
pack-priv boolean
pack-priv boolean
pack-priv int
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.h2.command.Token:
clonesetStartstartsubtractFromStartvalue

Field Detail

identifierback to summary
private String identifier
quotedback to summary
private final boolean quoted
unicodeback to summary
private boolean unicode

Constructor Detail

IdentifierTokenback to summary
pack-priv IdentifierToken(int start, String identifier, boolean quoted, boolean unicode)

Method Detail

asIdentifierback to summary
pack-priv String asIdentifier()

Overrides org.h2.command.Token.asIdentifier.

Annotations
@Override
convertUnicodeback to summary
pack-priv void convertUnicode(int uescape)

Overrides org.h2.command.Token.convertUnicode.

Annotations
@Override
isQuotedback to summary
pack-priv boolean isQuoted()

Overrides org.h2.command.Token.isQuoted.

Annotations
@Override
needsUnicodeConversionback to summary
pack-priv boolean needsUnicodeConversion()

Overrides org.h2.command.Token.needsUnicodeConversion.

Annotations
@Override
tokenTypeback to summary
pack-priv int tokenType()

Implements abstract org.h2.command.Token.tokenType.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.h2.command back to summary

pack-priv final Class Token.IntegerToken

extends LiteralToken
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
Inherited from org.h2.command.Token.LiteralToken:
value

Constructor Summary

AccessConstructor and Description
pack-priv
IntegerToken(int start, int number)

Method Summary

Modifier and TypeMethod and Description
pack-priv Value
Inherited from org.h2.command.Token.LiteralToken:
tokenTypetoString

Field Detail

numberback to summary
private final int number

Constructor Detail

IntegerTokenback to summary
pack-priv IntegerToken(int start, int number)

Method Detail

valueback to summary
pack-priv Value value(CastDataProvider provider)

Overrides org.h2.command.Token.value.

Annotations
@Override
org.h2.command back to summary

pack-priv final Class Token.KeywordOrIdentifierToken

extends Token
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String
private final int
Inherited from org.h2.command.Token:
ASTERISKATBIGGERBIGGER_EQUALCLOSE_BRACECLOSE_BRACKETCLOSE_PARENCOLONCOLON_COLONCOLON_EQCOMMACONCATENATIONDOTEND_OF_INPUTEQUALLITERALMINUS_SIGNNOT_EQUALNOT_TILDEOPEN_BRACEOPEN_BRACKETOPEN_PARENPARAMETERPERCENTPLUS_SIGNSEMICOLONSLASHSMALLERSMALLER_EQUALSPATIAL_INTERSECTSTILDETOKENS

Constructor Summary

AccessConstructor and Description
pack-priv
KeywordOrIdentifierToken(int start, int type, String identifier)

Method Summary

Modifier and TypeMethod and Description
pack-priv String
pack-priv int
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.h2.command.Token:
cloneconvertUnicodeisQuotedneedsUnicodeConversionsetStartstartsubtractFromStartvalue

Field Detail

identifierback to summary
private final String identifier
typeback to summary
private final int type

Constructor Detail

KeywordOrIdentifierTokenback to summary
pack-priv KeywordOrIdentifierToken(int start, int type, String identifier)

Method Detail

asIdentifierback to summary
pack-priv String asIdentifier()

Overrides org.h2.command.Token.asIdentifier.

Annotations
@Override
tokenTypeback to summary
pack-priv int tokenType()

Implements abstract org.h2.command.Token.tokenType.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.h2.command back to summary

pack-priv final Class Token.KeywordToken

extends Token
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
Inherited from org.h2.command.Token:
ASTERISKATBIGGERBIGGER_EQUALCLOSE_BRACECLOSE_BRACKETCLOSE_PARENCOLONCOLON_COLONCOLON_EQCOMMACONCATENATIONDOTEND_OF_INPUTEQUALLITERALMINUS_SIGNNOT_EQUALNOT_TILDEOPEN_BRACEOPEN_BRACKETOPEN_PARENPARAMETERPERCENTPLUS_SIGNSEMICOLONSLASHSMALLERSMALLER_EQUALSPATIAL_INTERSECTSTILDETOKENS

Constructor Summary

AccessConstructor and Description
pack-priv
KeywordToken(int start, int type)

Method Summary

Modifier and TypeMethod and Description
pack-priv String
pack-priv int
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.h2.command.Token:
cloneconvertUnicodeisQuotedneedsUnicodeConversionsetStartstartsubtractFromStartvalue

Field Detail

typeback to summary
private final int type

Constructor Detail

KeywordTokenback to summary
pack-priv KeywordToken(int start, int type)

Method Detail

asIdentifierback to summary
pack-priv String asIdentifier()

Overrides org.h2.command.Token.asIdentifier.

Annotations
@Override
tokenTypeback to summary
pack-priv int tokenType()

Implements abstract org.h2.command.Token.tokenType.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.h2.command back to summary

pack-priv abstract Class Token.LiteralToken

extends Token
Class Inheritance
Known Direct Subclasses
org.h2.command.Token.BinaryStringToken, org.h2.command.Token.CharacterStringToken, org.h2.command.Token.IntegerToken, org.h2.command.Token.BigintToken, org.h2.command.Token.ValueToken

Field Summary

Modifier and TypeField and Description
pack-priv Value
Inherited from org.h2.command.Token:
ASTERISKATBIGGERBIGGER_EQUALCLOSE_BRACECLOSE_BRACKETCLOSE_PARENCOLONCOLON_COLONCOLON_EQCOMMACONCATENATIONDOTEND_OF_INPUTEQUALLITERALMINUS_SIGNNOT_EQUALNOT_TILDEOPEN_BRACEOPEN_BRACKETOPEN_PARENPARAMETERPERCENTPLUS_SIGNSEMICOLONSLASHSMALLERSMALLER_EQUALSPATIAL_INTERSECTSTILDETOKENS

Constructor Summary

AccessConstructor and Description
pack-priv
LiteralToken(int start)

Method Summary

Modifier and TypeMethod and Description
pack-priv final int
public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.h2.command.Token:
asIdentifiercloneconvertUnicodeisQuotedneedsUnicodeConversionsetStartstartsubtractFromStartvalue

Field Detail

valueback to summary
pack-priv Value value

Constructor Detail

LiteralTokenback to summary
pack-priv LiteralToken(int start)

Method Detail

tokenTypeback to summary
pack-priv final int tokenType()

Implements abstract org.h2.command.Token.tokenType.

Annotations
@Override
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.h2.command back to summary

pack-priv final Class Token.ParameterToken

extends Token
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv int
Inherited from org.h2.command.Token:
ASTERISKATBIGGERBIGGER_EQUALCLOSE_BRACECLOSE_BRACKETCLOSE_PARENCOLONCOLON_COLONCOLON_EQCOMMACONCATENATIONDOTEND_OF_INPUTEQUALLITERALMINUS_SIGNNOT_EQUALNOT_TILDEOPEN_BRACEOPEN_BRACKETOPEN_PARENPARAMETERPERCENTPLUS_SIGNSEMICOLONSLASHSMALLERSMALLER_EQUALSPATIAL_INTERSECTSTILDETOKENS

Constructor Summary

AccessConstructor and Description
pack-priv
ParameterToken(int start, int index)

Method Summary

Modifier and TypeMethod and Description
pack-priv String
pack-priv int
pack-priv int
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.h2.command.Token:
cloneconvertUnicodeisQuotedneedsUnicodeConversionsetStartstartsubtractFromStartvalue

Field Detail

indexback to summary
pack-priv int index

Constructor Detail

ParameterTokenback to summary
pack-priv ParameterToken(int start, int index)

Method Detail

asIdentifierback to summary
pack-priv String asIdentifier()

Overrides org.h2.command.Token.asIdentifier.

Annotations
@Override
indexback to summary
pack-priv int index()
tokenTypeback to summary
pack-priv int tokenType()

Implements abstract org.h2.command.Token.tokenType.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.h2.command back to summary

pack-priv final Class Token.ValueToken

extends LiteralToken
Class Inheritance

Field Summary

Inherited from org.h2.command.Token.LiteralToken:
value

Constructor Summary

AccessConstructor and Description
pack-priv
ValueToken(int start, Value value)

Method Summary

Modifier and TypeMethod and Description
pack-priv Value
Inherited from org.h2.command.Token.LiteralToken:
tokenTypetoString

Constructor Detail

ValueTokenback to summary
pack-priv ValueToken(int start, Value value)

Method Detail

valueback to summary
pack-priv Value value(CastDataProvider provider)

Overrides org.h2.command.Token.value.

Annotations
@Override