Class TypeByteArray

java.lang.Object
dk.mada.jaxrs.model.types.TypeByteArray
All Implemented Interfaces:
Type

public final class TypeByteArray extends Object implements Type
Special type for handing byte[] type. In resources this would be treated as a stream, while it it treated as an array in DTOs.
  • Method Details

    • getArray

      public static TypeByteArray getArray()
      Returns the byte-array instance.
      Returns:
      the byte-array instance
    • getStream

      public static TypeByteArray getStream()
      Returns the stream instance.
      Returns:
      the stream instance
    • isStream

      public boolean isStream()
      Returns true if this is the stream instance, otherwise false.
      Returns:
      true if this is the stream instance, otherwise false
    • isArray

      public boolean isArray()
      Returns true if this is the byte-array instance, otherwise false.
      Returns:
      true if this is the byte-array instance, otherwise false
    • typeName

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

      public String toString()
      Overrides:
      toString in class Object
    • neededImports

      public 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