public class IntrospectionService extends java.lang.Object implements IntrospectionConfigurer, IsIntrospectableResolver, TypeInfoResolver, PropertyAccessExceptionHandlerResolver
限定符和类型 | 类和说明 |
---|---|
static class |
IntrospectionService.IntrospectionMode |
IntrospectionConfigurer.Of
构造器和说明 |
---|
IntrospectionService(ObjectDifferBuilder objectDifferBuilder) |
限定符和类型 | 方法和说明 |
---|---|
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. during merging) it will
implicitly create missing instances of its parent objects along the path to the root object. |
TypeInfo |
typeInfoForNode(DiffNode node) |
public IntrospectionService(ObjectDifferBuilder objectDifferBuilder)
public boolean isIntrospectable(DiffNode node)
isIntrospectable
在接口中 IsIntrospectableResolver
true
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
在接口中 PropertyAccessExceptionHandlerResolver
parentType
- The type of the object to which the property belongs.propertyName
- The name of the property.public TypeInfo typeInfoForNode(DiffNode node)
typeInfoForNode
在接口中 TypeInfoResolver
public Introspector introspectorForNode(DiffNode node)
public IntrospectionConfigurer setInstanceFactory(InstanceFactory instanceFactory)
IntrospectionConfigurer
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
.setInstanceFactory
在接口中 IntrospectionConfigurer
instanceFactory
- A custom instance factorypublic IntrospectionConfigurer setDefaultIntrospector(Introspector introspector)
public IntrospectionConfigurer handlePropertyAccessExceptionsUsing(PropertyAccessExceptionHandler exceptionHandler)
public IntrospectionConfigurer.Of ofType(java.lang.Class<?> type)
ofType
在接口中 IntrospectionConfigurer
public IntrospectionConfigurer.Of ofNode(NodePath path)
ofNode
在接口中 IntrospectionConfigurer
public ObjectDifferBuilder and()
and
在接口中 IntrospectionConfigurer