Package dk.mada.jaxrs.model.types
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 dk.mada.jaxrs.model.types.Reference
refType, validationMethods inherited from interface dk.mada.jaxrs.model.types.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
Description copied from interface:TypeReturns the type name. -
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
default boolean isDto()Description copied from interface:TypeReturns true if this type represents a custom type DTO. -
wrapperTypeName
Description copied from interface:TypeReturns the wrapper type name.- Specified by:
wrapperTypeNamein interfaceType- Returns:
- the wrapper type name
-
isVoid
default boolean isVoid()Description copied from interface:TypeReturns true if this type represents void. -
isEnum
default boolean isEnum()Description copied from interface:TypeReturns true if this type represents an enumeration. -
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
default boolean isDate()Description copied from interface:TypeReturns true if this type represents date. -
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
default boolean isTime()Description copied from interface:TypeReturns true if this type represents time. -
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
-