Package dk.mada.jaxrs.model.types
Interface TypeReference
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 boolean
Returns true if this type represents big-decimal.default boolean
Returns true if this type represents a container, otherwise false.default boolean
isDate()
Returns true if this type represents date.default boolean
Returns true if this type represents date-time.default boolean
isDto()
Returns true if this type represents a custom type DTO.default boolean
isEnum()
Returns true if this type represents an enumeration.default boolean
isPrimitive
(Primitive primitive) Return true if this type is the given primitive.default boolean
isTime()
Returns true if this type represents time.default boolean
isVoid()
Returns true if this type represents void.Returns the set of imports needed to use this type in a DTO.static TypeReference
of
(Type refType, Validation validation) Creates a new type reference.default TypeName
typeName()
Returns the type name.default TypeName
Returns the wrapper type name.Methods inherited from interface dk.mada.jaxrs.model.types.Reference
refType, validation
Methods 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:Type
Returns the type name. -
neededImports
Description copied from interface:Type
Returns the set of imports needed to use this type in a DTO.- Specified by:
neededImports
in interfaceType
- Returns:
- the set of imports needed to use this type in a DTO
-
isDto
default boolean isDto()Description copied from interface:Type
Returns true if this type represents a custom type DTO. -
wrapperTypeName
Description copied from interface:Type
Returns the wrapper type name.- Specified by:
wrapperTypeName
in interfaceType
- Returns:
- the wrapper type name
-
isVoid
default boolean isVoid()Description copied from interface:Type
Returns true if this type represents void. -
isEnum
default boolean isEnum()Description copied from interface:Type
Returns true if this type represents an enumeration. -
isBigDecimal
default boolean isBigDecimal()Description copied from interface:Type
Returns true if this type represents big-decimal.- Specified by:
isBigDecimal
in interfaceType
- Returns:
- true if this type represents big-decimal
-
isContainer
default boolean isContainer()Description copied from interface:Type
Returns true if this type represents a container, otherwise false.- Specified by:
isContainer
in interfaceType
- Returns:
- true if this type represents a container, otherwise false
-
isDate
default boolean isDate()Description copied from interface:Type
Returns true if this type represents date. -
isDateTime
default boolean isDateTime()Description copied from interface:Type
Returns true if this type represents date-time.- Specified by:
isDateTime
in interfaceType
- Returns:
- true if this type represents date-time
-
isTime
default boolean isTime()Description copied from interface:Type
Returns true if this type represents time. -
isPrimitive
Description copied from interface:Type
Return true if this type is the given primitive.- Specified by:
isPrimitive
in interfaceType
- Parameters:
primitive
- the primitive to compare against- Returns:
- true if the same primitive, otherwise false
-