Interface Type

All Known Subinterfaces:
Dto, ParserTypeCombined, ParserTypeComposite, ParserTypeRef, Reference, TypeArray, TypeContainer, TypeEnum, TypeInterface, TypeMap, TypeReference, TypeSet, TypeValidation
All Known Implementing Classes:
Primitive, TypeBigDecimal, TypeByteArray, TypeDate, TypeDateTime, TypeLocalTime, TypeObject, TypePlainObject, TypeUnknownAtParseTime, TypeUUID, TypeVoid

public interface Type
Types in the model. These model the OpenApi types, so represent both java primitives, containers and some specific java library classes (e.g. for dates). Plus all the specification-specific DTO types.
  • 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
    Returns true if this type represents the plain object.
    default boolean
    Return true if this type is a primitive.
    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 UUID.
    default boolean
    Returns true if this type represents validation information, otherwise false.
    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.
    Returns the type name.
    default TypeName
    Returns the wrapper type name.
  • Method Details

    • typeName

      TypeName typeName()
      Returns the type name.
      Returns:
      the type name
    • wrapperTypeName

      default TypeName wrapperTypeName()
      Returns the wrapper type name.
      Returns:
      the wrapper type name
    • neededImports

      default Set<String> neededImports()
      Returns the set of imports needed to use this type in a DTO.
      Returns:
      the set of imports needed to use this type in a DTO
    • isDto

      default boolean isDto()
      Returns true if this type represents a custom type DTO.
      Returns:
      true if this type represents a custom type DTO
    • isBigDecimal

      default boolean isBigDecimal()
      Returns true if this type represents big-decimal.
      Returns:
      true if this type represents big-decimal
    • isDate

      default boolean isDate()
      Returns true if this type represents date.
      Returns:
      true if this type represents date
    • isDateTime

      default boolean isDateTime()
      Returns true if this type represents date-time.
      Returns:
      true if this type represents date-time
    • isTime

      default boolean isTime()
      Returns true if this type represents time.
      Returns:
      true if this type represents time
    • isUUID

      default boolean isUUID()
      Returns true if this type represents UUID.
      Returns:
      true if this type represents UUID
    • isVoid

      default boolean isVoid()
      Returns true if this type represents void.
      Returns:
      true if this type represents void
    • isEnum

      default boolean isEnum()
      Returns true if this type represents an enumeration.
      Returns:
      true if this type represents an enumeration
    • isContainer

      default boolean isContainer()
      Returns true if this type represents a container, otherwise false.
      Returns:
      true if this type represents a container, otherwise false
    • isValidation

      default boolean isValidation()
      Returns true if this type represents validation information, otherwise false.
      Returns:
      true if this type represents validation information, otherwise false
    • isPrimitive

      default boolean isPrimitive(Primitive primitive)
      Return true if this type is the given primitive.
      Parameters:
      primitive - the primitive to compare against
      Returns:
      true if the same primitive, otherwise false
    • isPrimitive

      default boolean isPrimitive()
      Return true if this type is a primitive.
      Returns:
      true if this is a privimive type
    • isPlainObject

      default boolean isPlainObject()
      Returns true if this type represents the plain object.
      Returns:
      true if this type represents the plain object