public class IntrospectionService extends java.lang.Object implements IntrospectionConfigurer, IsIntrospectableResolver, TypeInfoResolver, PropertyAccessExceptionHandlerResolver
| Modifier and Type | Class and Description |
|---|---|
static class |
IntrospectionService.IntrospectionMode |
IntrospectionConfigurer.Of| Constructor and Description |
|---|
IntrospectionService(ObjectDifferBuilder objectDifferBuilder) |
| Modifier and Type | Method and Description |
|---|---|
ObjectDifferBuilder |
and() |
IntrospectionConfigurer |
handlePropertyAccessExceptionsUsing(PropertyAccessExceptionHandler exceptionHandler) |
Introspector |
introspectorForNode(DiffNode node) |
boolean |
isIntrospectable(DiffNode node) |
IntrospectionConfigurer.Of |
ofNode(NodePath path) |
IntrospectionConfigurer.Of |
ofType(java.lang.Class<?> type) |
PropertyAccessExceptionHandler |
resolvePropertyAccessExceptionHandler(java.lang.Class<?> parentType,
java.lang.String propertyName) |
IntrospectionConfigurer |
setDefaultIntrospector(Introspector introspector) |
IntrospectionConfigurer |
setInstanceFactory(InstanceFactory instanceFactory)
When assigning new values via
DiffNode (e.g. |
TypeInfo |
typeInfoForNode(DiffNode node) |
public IntrospectionService(ObjectDifferBuilder objectDifferBuilder)
public boolean isIntrospectable(DiffNode node)
isIntrospectable in interface IsIntrospectableResolvertrue if the object represented by the given node should be compared via
introspection.public PropertyAccessExceptionHandler resolvePropertyAccessExceptionHandler(java.lang.Class<?> parentType, java.lang.String propertyName)
resolvePropertyAccessExceptionHandler in interface PropertyAccessExceptionHandlerResolverparentType - The type of the object to which the property belongs.propertyName - The name of the property.public TypeInfo typeInfoForNode(DiffNode node)
typeInfoForNode in interface TypeInfoResolverpublic Introspector introspectorForNode(DiffNode node)
public IntrospectionConfigurer setInstanceFactory(InstanceFactory instanceFactory)
IntrospectionConfigurerDiffNode (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.setInstanceFactory in interface IntrospectionConfigurerinstanceFactory - A custom instance factorypublic IntrospectionConfigurer setDefaultIntrospector(Introspector introspector)
setDefaultIntrospector in interface IntrospectionConfigurerpublic IntrospectionConfigurer handlePropertyAccessExceptionsUsing(PropertyAccessExceptionHandler exceptionHandler)
handlePropertyAccessExceptionsUsing in interface IntrospectionConfigurerpublic IntrospectionConfigurer.Of ofType(java.lang.Class<?> type)
ofType in interface IntrospectionConfigurerpublic IntrospectionConfigurer.Of ofNode(NodePath path)
ofNode in interface IntrospectionConfigurerpublic ObjectDifferBuilder and()
and in interface IntrospectionConfigurer