public interface IntrospectionConfigurer
限定符和类型 | 接口和说明 |
---|---|
static interface |
IntrospectionConfigurer.Of |
限定符和类型 | 方法和说明 |
---|---|
ObjectDifferBuilder |
and() |
IntrospectionConfigurer |
handlePropertyAccessExceptionsUsing(PropertyAccessExceptionHandler exceptionHandler) |
IntrospectionConfigurer.Of |
ofNode(NodePath path) |
IntrospectionConfigurer.Of |
ofType(java.lang.Class<?> type) |
IntrospectionConfigurer |
setDefaultIntrospector(Introspector introspector) |
IntrospectionConfigurer |
setInstanceFactory(InstanceFactory instanceFactory)
When assigning new values via
DiffNode (e.g. during merging) it will
implicitly create missing instances of its parent objects along the path to the root object. |
IntrospectionConfigurer setInstanceFactory(InstanceFactory instanceFactory)
DiffNode
(e.g. during merging) it will
implicitly create missing instances of its parent objects along the path to the root object. By default those
instances will be created via public non-arg constructor. If that fails a TypeInstantiationException
will be thrown.
To add support for types that need to be instantiated differently you can overide the default behavior via
custom InstanceFactory
. When doing so, don't worry about types
actually that are suitable for the default behavior, as it will automatically kick in, whenever the custom
factroy returns null
.instanceFactory
- A custom instance factoryjava.lang.IllegalArgumentException
- when the instanceFactory is nullIntrospectionConfigurer setDefaultIntrospector(Introspector introspector)
IntrospectionConfigurer handlePropertyAccessExceptionsUsing(PropertyAccessExceptionHandler exceptionHandler)
IntrospectionConfigurer.Of ofType(java.lang.Class<?> type)
IntrospectionConfigurer.Of ofNode(NodePath path)
ObjectDifferBuilder and()