Package org.instancio

Interface InstancioOfClassApi<T>

Type Parameters:
T - type being created
All Superinterfaces:
InstancioApi<T>
All Known Implementing Classes:
ClassInstancioApiImpl

public interface InstancioOfClassApi<T> extends InstancioApi<T>
Instancio API for defining type parameters for generic classes.
  • Method Details

    • withTypeParameters

      InstancioApi<T> withTypeParameters(Class<?>... type)
      Method for supplying type parameters for generic classes.

      Example:

      
           List<Address> addresses = Instancio.of(List.class)
                   .withTypeParameters(Address.class)
                   .create();
       
      Parameters:
      type - one or more types
      Returns:
      API builder reference