Interface InstanceProvider

All Known Implementing Classes:
BannedGenerator, CollectionGenerator, DefaultInstances, ExistingGenerator, PrimitiveGenerator

public interface InstanceProvider
Represents a type generator for specific types.
Author:
Kristian
  • Method Summary

    Modifier and Type
    Method
    Description
    create​(Class<?> type)
    Create an instance given a type, if possible.
  • Method Details

    • create

      Object create(@Nullable Class<?> type)
      Create an instance given a type, if possible.
      Parameters:
      type - - type to create.
      Returns:
      The instance, or NULL if the type cannot be created.
      Throws:
      NotConstructableException - Thrown to indicate that this type cannot or should never be constructed.