T - the type of object constructedpublic abstract class TypeDispatchedConstructor<T> extends Object implements TokenTypeDispatcher
Default behavior is implemented for all types, making it necessary
to only implement those methods applicable to types supported by the
factory. The default implementation is to invoke an error handler
method, handleUnsupportedType(TokenType), which must be
implemented by derived classes.
| Modifier and Type | Field and Description |
|---|---|
protected T |
result
Holds the resulting constructed object.
|
| Constructor and Description |
|---|
TypeDispatchedConstructor() |
| Modifier and Type | Method and Description |
|---|---|
T |
constructForType(TokenType type)
Construct an object appropriate for the specified type.
|
void |
dispatchBinaryType()
Handle processing for binary typed tokens.
|
void |
dispatchBooleanType()
Handle processing for boolean typed tokens.
|
void |
dispatchCharType()
Handle processing for character typed tokens.
|
void |
dispatchDateType()
Handle processing for date typed tokens.
|
void |
dispatchDoubleType()
Handle processing for double typed tokens.
|
void |
dispatchEnumType(EnumTokenType type)
Handle processing for enumeration typed tokens.
|
void |
dispatchFloatType()
Handle processing for float typed tokens.
|
void |
dispatchGenericType()
Handle processing for generic typed tokens.
|
void |
dispatchIntType()
Handle processing for integer typed tokens.
|
void |
dispatchLongType()
Handle processing for long typed tokens.
|
void |
dispatchNullType()
Handle processing for null typed tokens.
|
void |
dispatchNumericType()
Handle processing for numeric typed tokens.
|
<O> void |
dispatchObjectType(ObjectTokenType<O> objectType)
Handle processing for object typed tokens.
|
void |
dispatchRecordType(RecordTokenType recordType)
Handle processing for record typed tokens.
|
void |
dispatchScalarType()
Handle processing for abstract scalar type
|
void |
dispatchStringType()
Handle processing for string typed tokens.
|
void |
dispatchTimestampType()
Handle processing for timestamp typed tokens.
|
void |
dispatchTimeType()
Handle processing for time typed tokens.
|
protected abstract void |
handleUnsupportedType(TokenType type)
Handles processing of the specified unsupported type.
|
protected T result
public T constructForType(TokenType type)
type - the typepublic void dispatchBinaryType()
TokenTypeDispatcherdispatchBinaryType in interface TokenTypeDispatcherpublic void dispatchBooleanType()
TokenTypeDispatcherdispatchBooleanType in interface TokenTypeDispatcherpublic void dispatchCharType()
TokenTypeDispatcherdispatchCharType in interface TokenTypeDispatcherpublic void dispatchDateType()
TokenTypeDispatcherdispatchDateType in interface TokenTypeDispatcherpublic void dispatchDoubleType()
TokenTypeDispatcherdispatchDoubleType in interface TokenTypeDispatcherpublic final void dispatchEnumType(EnumTokenType type)
TokenTypeDispatcherdispatchEnumType in interface TokenTypeDispatchertype - the enumeration type being processedpublic void dispatchFloatType()
TokenTypeDispatcherdispatchFloatType in interface TokenTypeDispatcherpublic void dispatchGenericType()
TokenTypeDispatcherdispatchGenericType in interface TokenTypeDispatcherpublic void dispatchIntType()
TokenTypeDispatcherdispatchIntType in interface TokenTypeDispatcherpublic void dispatchLongType()
TokenTypeDispatcherdispatchLongType in interface TokenTypeDispatcherpublic void dispatchNullType()
TokenTypeDispatcherdispatchNullType in interface TokenTypeDispatcherpublic void dispatchNumericType()
TokenTypeDispatcherdispatchNumericType in interface TokenTypeDispatcherpublic <O> void dispatchObjectType(ObjectTokenType<O> objectType)
TokenTypeDispatcherdispatchObjectType in interface TokenTypeDispatcherO - the object typeobjectType - the object type being processedpublic void dispatchRecordType(RecordTokenType recordType)
TokenTypeDispatcherdispatchRecordType in interface TokenTypeDispatcherrecordType - the record type being processed.public void dispatchScalarType()
TokenTypeDispatcherdispatchScalarType in interface TokenTypeDispatcherpublic void dispatchStringType()
TokenTypeDispatcherdispatchStringType in interface TokenTypeDispatcherpublic void dispatchTimeType()
TokenTypeDispatcherdispatchTimeType in interface TokenTypeDispatcherpublic void dispatchTimestampType()
TokenTypeDispatcherdispatchTimestampType in interface TokenTypeDispatcherprotected abstract void handleUnsupportedType(TokenType type)
type - the unsupported token typeCopyright © 2016 Actian Corporation. All rights reserved.