Interface TypeReference

All Superinterfaces:
Reference, Type

@Immutable public interface TypeReference extends Reference
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 Type
    Method
    Description
    default boolean
    Returns true if this type represents big-decimal.
    default boolean
    Returns true if this type represents a container, otherwise false.
    default boolean
    Returns true if this type represents date.
    default boolean
    Returns true if this type represents date-time.
    default boolean
    Returns true if this type represents a custom type DTO.
    default boolean
    Returns true if this type represents an enumeration.
    default boolean
    Return true if this type is the given primitive.
    default boolean
    Returns true if this type represents time.
    default boolean
    Returns true if this type represents void.
    default Set<String>
    Returns the set of imports needed to use this type in a DTO.
    of(Type refType, Validation validation)
    Creates a new type reference.
    default 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

      static TypeReference of(Type refType, Validation validation)
      Creates a new type reference.
      Parameters:
      refType - the type referenced
      validation - the validation requirements of the reference
      Returns:
      a reference to the type
    • typeName

      default TypeName typeName()
      Description copied from interface: Type
      Returns the type name.
      Specified by:
      typeName in interface Type
      Returns:
      the type name
    • neededImports

      default Set<String> neededImports()
      Description copied from interface: Type
      Returns the set of imports needed to use this type in a DTO.
      Specified by:
      neededImports in interface Type
      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.
      Specified by:
      isDto in interface Type
      Returns:
      true if this type represents a custom type DTO
    • wrapperTypeName

      default TypeName wrapperTypeName()
      Description copied from interface: Type
      Returns the wrapper type name.
      Specified by:
      wrapperTypeName in interface Type
      Returns:
      the wrapper type name
    • isVoid

      default boolean isVoid()
      Description copied from interface: Type
      Returns true if this type represents void.
      Specified by:
      isVoid in 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.
      Specified by:
      isEnum in 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 interface Type
      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 interface Type
      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.
      Specified by:
      isDate in 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 interface Type
      Returns:
      true if this type represents date-time
    • isTime

      default boolean isTime()
      Description copied from interface: Type
      Returns true if this type represents time.
      Specified by:
      isTime in interface Type
      Returns:
      true if this type represents time
    • isPrimitive

      default boolean isPrimitive(Primitive primitive)
      Description copied from interface: Type
      Return true if this type is the given primitive.
      Specified by:
      isPrimitive in interface Type
      Parameters:
      primitive - the primitive to compare against
      Returns:
      true if the same primitive, otherwise false