Interface TypeInterface

All Superinterfaces:
Type

@Immutable public interface TypeInterface extends Type
Type representing an interface (schema with anyOf).
  • Method Details

    • of

      static TypeInterface of(String packageName, TypeName typeName, Set<TypeName> implementations)
      Creates a type for an interface. I expect all the type names implementing the interface to be resolved as DTOs.
      Parameters:
      packageName - the package name of DTOs
      typeName - the interface type name
      implementations - the type names implementing the interface
      Returns:
      an interface type
    • packageName

      String packageName()
      Returns the name of the package the interface is generated in.
      Returns:
      the name of the package the interface is generated in
    • implementations

      List<TypeName> implementations()
      Returns the type names implementing this interface.
      Returns:
      the type names implementing this interface
    • 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