Class ClassInstancioApiImpl<T>

java.lang.Object
org.instancio.internal.InstancioApiImpl<T>
org.instancio.internal.ClassInstancioApiImpl<T>
All Implemented Interfaces:
InstancioApi<T>, InstancioOfClassApi<T>

public class ClassInstancioApiImpl<T> extends InstancioApiImpl<T> implements InstancioOfClassApi<T>
  • Constructor Details

    • ClassInstancioApiImpl

      public ClassInstancioApiImpl(Class<T> klass)
  • Method Details

    • withTypeParameters

      public InstancioApi<T> withTypeParameters(Class<?>... type)
      Description copied from interface: InstancioOfClassApi
      Method for supplying type parameters for generic classes.

      Example:

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