Class FillArray

java.lang.Object
ru.objectsfill.types.array.FillArray

public class FillArray extends Object
Creates and fills arrays (both reference and primitive types) with randomly generated values.
  • Constructor Details

    • FillArray

      public FillArray()
  • Method Details

    • createArray

      public <T> Object[] createArray(Class<T> fieldType, Fill fill)
      Creates an array of the specified type and fills it with generated values.
      Type Parameters:
      T - the component type
      Parameters:
      fieldType - the array or component type
      fill - the generation parameters
      Returns:
      the filled array
    • createArray

      public <T> Object[] createArray(Class<T> fieldType, Fill fill, Field field)
      Creates an array of the specified type and fills it with generated values. Dispatches to specialized handling for primitive arrays or reference arrays.
      Type Parameters:
      T - the component type
      Parameters:
      fieldType - the array or component type
      fill - the generation parameters
      field - the field for which the array is generated (may be null)
      Returns:
      the filled array