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 |
dispatchDurationType()
Handle processing for duration 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 |
dispatchIp4AddressType()
Handle processing for ip4address typed tokens.
|
void |
dispatchIp6AddressType()
Handle processing for ip6address typed tokens.
|
void |
dispatchLongType()
Handle processing for long typed tokens.
|
void |
dispatchMoneyType()
Handle processing for money 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 |
dispatchPeriodType()
Handle processing for period 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()
TokenTypeDispatcher
dispatchBinaryType
in interface TokenTypeDispatcher
public void dispatchBooleanType()
TokenTypeDispatcher
dispatchBooleanType
in interface TokenTypeDispatcher
public void dispatchCharType()
TokenTypeDispatcher
dispatchCharType
in interface TokenTypeDispatcher
public void dispatchDurationType()
TokenTypeDispatcher
dispatchDurationType
in interface TokenTypeDispatcher
public void dispatchDateType()
TokenTypeDispatcher
dispatchDateType
in interface TokenTypeDispatcher
public void dispatchDoubleType()
TokenTypeDispatcher
dispatchDoubleType
in interface TokenTypeDispatcher
public final void dispatchEnumType(EnumTokenType type)
TokenTypeDispatcher
dispatchEnumType
in interface TokenTypeDispatcher
type
- the enumeration type being processedpublic void dispatchFloatType()
TokenTypeDispatcher
dispatchFloatType
in interface TokenTypeDispatcher
public void dispatchGenericType()
TokenTypeDispatcher
dispatchGenericType
in interface TokenTypeDispatcher
public void dispatchIntType()
TokenTypeDispatcher
dispatchIntType
in interface TokenTypeDispatcher
public void dispatchIp4AddressType()
TokenTypeDispatcher
dispatchIp4AddressType
in interface TokenTypeDispatcher
public void dispatchIp6AddressType()
TokenTypeDispatcher
dispatchIp6AddressType
in interface TokenTypeDispatcher
public void dispatchLongType()
TokenTypeDispatcher
dispatchLongType
in interface TokenTypeDispatcher
public void dispatchMoneyType()
TokenTypeDispatcher
dispatchMoneyType
in interface TokenTypeDispatcher
public void dispatchNullType()
TokenTypeDispatcher
dispatchNullType
in interface TokenTypeDispatcher
public void dispatchNumericType()
TokenTypeDispatcher
dispatchNumericType
in interface TokenTypeDispatcher
public <O> void dispatchObjectType(ObjectTokenType<O> objectType)
TokenTypeDispatcher
dispatchObjectType
in interface TokenTypeDispatcher
O
- the object typeobjectType
- the object type being processedpublic void dispatchPeriodType()
TokenTypeDispatcher
dispatchPeriodType
in interface TokenTypeDispatcher
public void dispatchRecordType(RecordTokenType recordType)
TokenTypeDispatcher
dispatchRecordType
in interface TokenTypeDispatcher
recordType
- the record type being processed.public void dispatchScalarType()
TokenTypeDispatcher
dispatchScalarType
in interface TokenTypeDispatcher
public void dispatchStringType()
TokenTypeDispatcher
dispatchStringType
in interface TokenTypeDispatcher
public void dispatchTimeType()
TokenTypeDispatcher
dispatchTimeType
in interface TokenTypeDispatcher
public void dispatchTimestampType()
TokenTypeDispatcher
dispatchTimestampType
in interface TokenTypeDispatcher
protected abstract void handleUnsupportedType(TokenType type)
type
- the unsupported token typeCopyright © 2021 Actian Corporation. All rights reserved.