Interface TypeMap

All Superinterfaces:
Type, TypeContainer
All Known Implementing Classes:
ImmutableTypeMap

@Immutable public interface TypeMap extends TypeContainer
Keys in a map must be a scalar string. https://swagger.io/specification/#format
  • Method Details

    • of

      static TypeMap of(TypeNames typeNames, Type innerType)
      Creates a new map-type instance. The key-type is hardwired to String, but the inner-type is as specified.
      Parameters:
      typeNames - the type names instance
      innerType - the type of the map values
      Returns:
      a new map-type.
    • newFreeFormObject

      static TypeMap newFreeFormObject(TypeNames typeNames)
      Creates a new free-form object-type instance. This has a hardwired value type of Object.
      Parameters:
      typeNames - the type names instance
      Returns:
      a new map-type
      See Also:
    • isFreeFormObject

      boolean isFreeFormObject()
      Returns true if this is a free-from object.
      Returns:
      true if this is a free-from object
    • containerImplementation

      default String containerImplementation()
      Description copied from interface: TypeContainer
      Returns the java implementation used to instantiate this container.
      Specified by:
      containerImplementation in interface TypeContainer
      Returns:
      the java implementation used to instantiate this container
    • containerImplementationDeclaration

      default String containerImplementationDeclaration()
      Description copied from interface: TypeContainer
      Returns the java implementation declaration with generic types.
      Specified by:
      containerImplementationDeclaration in interface TypeContainer
      Returns:
      the java implementation declaration with generic types
    • typeName

      default TypeName typeName()
      Returns the type name. Note that this needs to be resolved late (when accessed) and not when created. This ensures that conflict-renaming of the inner-type is reflected in the final type name.
      Specified by:
      typeName in interface Type
      Returns:
      the type name