Interface Instantiator
- All Known Implementing Classes:
ConstructorInstantiator,EmptyInstantiator
public interface Instantiator
A utility to instantiate objects from values loaded from config
-
Method Summary
Modifier and TypeMethodDescriptionstatic InstantiatorgetInstantiator(Class<?> clazz) Attemps to get the appropriate Instantiator for the given class type<T> Tinstantiate(ConversionManager manager, Object target, Class<T> clazz, List<Object> values, String path, FieldSummary info) Instantiates and/or loads data into an objectstatic boolean
-
Method Details
-
isRecord
-
getInstantiator
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 converterstarget- The target object, or nullclazz- The class whose fields are being usedvalues- The values for the fieldspath- The path in configinfo- Extra info about the instantiation- Returns:
- An instantiated object, or the input object with its fields modified
-