Interface Instantiator

All Known Implementing Classes:
ConstructorInstantiator, EmptyInstantiator

public interface Instantiator
A utility to instantiate objects from values loaded from config
  • Method Details

    • isRecord

      static boolean isRecord(Class<?> clazz)
    • getInstantiator

      static Instantiator getInstantiator(Class<?> clazz)
      Attemps to get the appropriate Instantiator for the given class type
      Parameters:
      clazz - The class type
      Returns:
      An Instantiator
      Throws:
      IllegalArgumentException - If the class cannot be instantiated by known methods
    • instantiate

      <T> T instantiate(ConversionManager manager, Object target, Class<T> clazz, List<Object> values, String path, FieldSummary info)
      Instantiates and/or loads data into an object
      Type Parameters:
      T - The type
      Parameters:
      manager - The ConversionManager handling converters
      target - The target object, or null
      clazz - The class whose fields are being used
      values - The values for the fields
      path - The path in config
      info - Extra info about the instantiation
      Returns:
      An instantiated object, or the input object with its fields modified