Class ClassInstance<T>

java.lang.Object
com.codebox.instance.ClassInstance<T>
Type Parameters:
T - the element type

public class ClassInstance<T> extends Object
The Class Instance.
  • Constructor Details

    • ClassInstance

      public ClassInstance()
  • Method Details

    • newInstance

      public final T newInstance(Class<T> clazz)
      New instance. This will get the first available constructor to run the test on. This allows for instances where there is intentionally not a no-arg constructor.
      Parameters:
      clazz - the class
      Returns:
      the t
    • buildValue

      public <R> Object buildValue(Class<R> returnType, LoadType loadType)
      Builds the value.
      Type Parameters:
      R - the generic type
      Parameters:
      returnType - the return type
      loadType - the load type
      Returns:
      the object