@Internal public final class DataTypeTemplate extends Object
DataTypeHint
and template for creating a single DataType
or a InputTypeStrategy
for groups of DataType
s.
All parameters of a template are optional. An empty annotation results in a template where all
members are null
.
Modifier and Type | Field and Description |
---|---|
Boolean |
allowRawGlobally |
String[] |
allowRawPattern |
DataType |
dataType |
Integer |
defaultDecimalPrecision |
Integer |
defaultDecimalScale |
Integer |
defaultSecondPrecision |
Integer |
defaultYearPrecision |
String[] |
forceRawPattern |
InputGroup |
inputGroup |
Class<? extends TypeSerializer<?>> |
rawSerializer |
ExtractionVersion |
version |
Modifier and Type | Method and Description |
---|---|
DataTypeTemplate |
copyWithoutDataType()
Copies this template but removes the explicit data type (if available).
|
boolean |
equals(Object o) |
static DataTypeTemplate |
fromAnnotation(DataTypeHint hint,
DataType dataType)
Creates an instance from the given
DataTypeHint with a resolved data type if available. |
static DataTypeTemplate |
fromAnnotation(DataTypeLookup lookup,
DataTypeHint hint)
Creates an instance from the given
DataTypeHint . |
static DataTypeTemplate |
fromDefaults()
Creates an instance with no parameter content.
|
boolean |
hasDataTypeDefinition()
Whether this template defines an explicit data type.
|
int |
hashCode() |
boolean |
hasInputGroupDefinition()
Whether this template defines a group of data types for an input argument.
|
boolean |
isAllowAnyPattern(Class<?> clazz)
Returns whether the given class is eligible for being treated as RAW type.
|
boolean |
isAllowRawGlobally()
Returns whether RAW types are allowed everywhere.
|
boolean |
isForceAnyPattern(Class<?> clazz)
Returns whether the given class must be treated as RAW type.
|
DataTypeTemplate |
mergeWithInnerAnnotation(DataTypeLookup lookup,
DataTypeHint hint)
Merges this template with an inner annotation.
|
ArgumentTypeStrategy |
toArgumentTypeStrategy()
Converts this template into an
ArgumentTypeStrategy . |
TypeStrategy |
toTypeStrategy()
Converts this template into a
TypeStrategy . |
@Nullable public final Class<? extends TypeSerializer<?>> rawSerializer
@Nullable public final InputGroup inputGroup
@Nullable public final ExtractionVersion version
public static DataTypeTemplate fromAnnotation(DataTypeLookup lookup, DataTypeHint hint)
DataTypeHint
. Resolves an explicitly defined data type
if DataTypeHint.value()
and/or DataTypeHint.bridgedTo()
are defined.public static DataTypeTemplate fromAnnotation(DataTypeHint hint, @Nullable DataType dataType)
DataTypeHint
with a resolved data type if available.public static DataTypeTemplate fromDefaults()
public DataTypeTemplate copyWithoutDataType()
public DataTypeTemplate mergeWithInnerAnnotation(DataTypeLookup lookup, DataTypeHint hint)
public boolean hasDataTypeDefinition()
public boolean hasInputGroupDefinition()
public ArgumentTypeStrategy toArgumentTypeStrategy()
ArgumentTypeStrategy
.public TypeStrategy toTypeStrategy()
TypeStrategy
.public boolean isAllowRawGlobally()
public boolean isAllowAnyPattern(@Nullable Class<?> clazz)
public boolean isForceAnyPattern(@Nullable Class<?> clazz)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.