Interface TypeReference
- All Known Implementing Classes:
ImmutableTypeReference
A reference to type with validation requirements.
The validation requirements apply for this particular reference (think of it as requirements that apply to the
parameter/property that references the type).
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReturns true if this type represents big-decimal.default booleanReturns true if this type represents a container, otherwise false.default booleanisDate()Returns true if this type represents date.default booleanReturns true if this type represents date-time.default booleanisDto()Returns true if this type represents a custom type DTO.default booleanisEnum()Returns true if this type represents an enumeration.default booleanisPrimitive(Primitive primitive) Return true if this type is the given primitive.default booleanisTime()Returns true if this type represents time.default booleanisVoid()Returns true if this type represents void.Returns the set of imports needed to use this type in a DTO.static TypeReferenceof(Type refType, Validation validation) Creates a new type reference.default TypeNametypeName()Returns the type name.default TypeNameReturns the wrapper type name.Methods inherited from interface Reference
refType, validationMethods inherited from interface Type
isPlainObject, isPrimitive, isUUID, isValidation
-
Method Details
-
of
Creates a new type reference.- Parameters:
refType- the type referencedvalidation- the validation requirements of the reference- Returns:
- a reference to the type
-
typeName
-
neededImports
Description copied from interface:TypeReturns the set of imports needed to use this type in a DTO.- Specified by:
neededImportsin interfaceType- Returns:
- the set of imports needed to use this type in a DTO
-
isDto
-
wrapperTypeName
Description copied from interface:TypeReturns the wrapper type name.- Specified by:
wrapperTypeNamein interfaceType- Returns:
- the wrapper type name
-
isVoid
-
isEnum
-
isBigDecimal
default boolean isBigDecimal()Description copied from interface:TypeReturns true if this type represents big-decimal.- Specified by:
isBigDecimalin interfaceType- Returns:
- true if this type represents big-decimal
-
isContainer
default boolean isContainer()Description copied from interface:TypeReturns true if this type represents a container, otherwise false.- Specified by:
isContainerin interfaceType- Returns:
- true if this type represents a container, otherwise false
-
isDate
-
isDateTime
default boolean isDateTime()Description copied from interface:TypeReturns true if this type represents date-time.- Specified by:
isDateTimein interfaceType- Returns:
- true if this type represents date-time
-
isTime
-
isPrimitive
Description copied from interface:TypeReturn true if this type is the given primitive.- Specified by:
isPrimitivein interfaceType- Parameters:
primitive- the primitive to compare against- Returns:
- true if the same primitive, otherwise false
-