public interface IntrospectionConfigurer
Modifier and Type | Interface and Description |
---|---|
static interface |
IntrospectionConfigurer.Of |
Modifier and Type | Method and Description |
---|---|
ObjectDifferBuilder |
and() |
IntrospectionConfigurer |
handlePropertyAccessExceptionsUsing(PropertyAccessExceptionHandler exceptionHandler) |
IntrospectionConfigurer.Of |
ofNode(NodePath path) |
IntrospectionConfigurer.Of |
ofType(Class<?> type) |
IntrospectionConfigurer |
setDefaultIntrospector(Introspector introspector) |
IntrospectionConfigurer |
setInstanceFactory(InstanceFactory instanceFactory)
When assigning new values via
DiffNode (e.g. |
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 factoryIllegalArgumentException
- when the instanceFactory is nullIntrospectionConfigurer setDefaultIntrospector(Introspector introspector)
IntrospectionConfigurer handlePropertyAccessExceptionsUsing(PropertyAccessExceptionHandler exceptionHandler)
IntrospectionConfigurer.Of ofType(Class<?> type)
IntrospectionConfigurer.Of ofNode(NodePath path)
ObjectDifferBuilder and()
Copyright © 2016. All rights reserved.