Class BeanWrapperSpy
java.lang.Object
org.apache.ignite.migrationtools.config.loader.BeanWrapperSpy
- All Implemented Interfaces:
org.springframework.beans.BeanWrapper,org.springframework.beans.ConfigurablePropertyAccessor,org.springframework.beans.PropertyAccessor,org.springframework.beans.PropertyEditorRegistry,org.springframework.beans.TypeConverter
A custom implementation that tracks which properties where explicitly set in the bean.
-
Field Summary
Fields inherited from interface org.springframework.beans.PropertyAccessor
NESTED_PROPERTY_SEPARATOR, NESTED_PROPERTY_SEPARATOR_CHAR, PROPERTY_KEY_PREFIX, PROPERTY_KEY_PREFIX_CHAR, PROPERTY_KEY_SUFFIX, PROPERTY_KEY_SUFFIX_CHAR -
Constructor Summary
ConstructorsConstructorDescriptionBeanWrapperSpy(org.apache.commons.collections4.MultiValuedMap<Object, org.apache.commons.lang3.tuple.Pair<PropertyDescriptor, org.springframework.beans.factory.config.BeanDefinition>> propertyTracker, org.springframework.beans.BeanWrapper base, org.springframework.beans.factory.support.RootBeanDefinition mbd) Constructor. -
Method Summary
Modifier and TypeMethodDescription<T> TconvertIfNecessary(Object value, Class<T> requiredType) <T> TconvertIfNecessary(Object value, Class<T> requiredType, Field field) <T> TconvertIfNecessary(Object value, Class<T> requiredType, org.springframework.core.convert.TypeDescriptor typeDescriptor) <T> TconvertIfNecessary(Object value, Class<T> requiredType, org.springframework.core.MethodParameter methodParam) findCustomEditor(Class<?> requiredType, String propertyPath) intorg.springframework.core.convert.ConversionServicegetPropertyDescriptor(String propertyName) Class<?>getPropertyType(String propertyName) org.springframework.core.convert.TypeDescriptorgetPropertyTypeDescriptor(String propertyName) getPropertyValue(String propertyName) Class<?>booleanbooleanbooleanisReadableProperty(String propertyName) booleanisWritableProperty(String propertyName) voidregisterCustomEditor(Class<?> requiredType, PropertyEditor propertyEditor) voidregisterCustomEditor(Class<?> requiredType, String propertyPath, PropertyEditor propertyEditor) voidsetAutoGrowCollectionLimit(int autoGrowCollectionLimit) voidsetAutoGrowNestedPaths(boolean autoGrowNestedPaths) voidsetConversionService(org.springframework.core.convert.ConversionService conversionService) voidsetExtractOldValueForEditor(boolean extractOldValueForEditor) voidsetPropertyValue(String propertyName, Object value) voidsetPropertyValue(org.springframework.beans.PropertyValue pv) voidsetPropertyValues(Map<?, ?> map) voidsetPropertyValues(org.springframework.beans.PropertyValues pvs) voidsetPropertyValues(org.springframework.beans.PropertyValues pvs, boolean ignoreUnknown) voidsetPropertyValues(org.springframework.beans.PropertyValues pvs, boolean ignoreUnknown, boolean ignoreInvalid)
-
Constructor Details
-
BeanWrapperSpy
public BeanWrapperSpy(org.apache.commons.collections4.MultiValuedMap<Object, org.apache.commons.lang3.tuple.Pair<PropertyDescriptor, org.springframework.beans.factory.config.BeanDefinition>> propertyTracker, org.springframework.beans.BeanWrapper base, org.springframework.beans.factory.support.RootBeanDefinition mbd) Constructor.- Parameters:
propertyTracker- Map that tracksbase- Delegated BeanWrappermbd- Root definition
-
-
Method Details
-
getAutoGrowCollectionLimit
public int getAutoGrowCollectionLimit()- Specified by:
getAutoGrowCollectionLimitin interfaceorg.springframework.beans.BeanWrapper
-
setAutoGrowCollectionLimit
public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit) - Specified by:
setAutoGrowCollectionLimitin interfaceorg.springframework.beans.BeanWrapper
-
getWrappedInstance
- Specified by:
getWrappedInstancein interfaceorg.springframework.beans.BeanWrapper
-
getWrappedClass
- Specified by:
getWrappedClassin interfaceorg.springframework.beans.BeanWrapper
-
getPropertyDescriptors
- Specified by:
getPropertyDescriptorsin interfaceorg.springframework.beans.BeanWrapper
-
getPropertyDescriptor
public PropertyDescriptor getPropertyDescriptor(String propertyName) throws org.springframework.beans.InvalidPropertyException - Specified by:
getPropertyDescriptorin interfaceorg.springframework.beans.BeanWrapper- Throws:
org.springframework.beans.InvalidPropertyException
-
getConversionService
@Nullable public org.springframework.core.convert.ConversionService getConversionService()- Specified by:
getConversionServicein interfaceorg.springframework.beans.ConfigurablePropertyAccessor
-
setConversionService
public void setConversionService(org.springframework.core.convert.ConversionService conversionService) - Specified by:
setConversionServicein interfaceorg.springframework.beans.ConfigurablePropertyAccessor
-
isExtractOldValueForEditor
public boolean isExtractOldValueForEditor()- Specified by:
isExtractOldValueForEditorin interfaceorg.springframework.beans.ConfigurablePropertyAccessor
-
setExtractOldValueForEditor
public void setExtractOldValueForEditor(boolean extractOldValueForEditor) - Specified by:
setExtractOldValueForEditorin interfaceorg.springframework.beans.ConfigurablePropertyAccessor
-
isAutoGrowNestedPaths
public boolean isAutoGrowNestedPaths()- Specified by:
isAutoGrowNestedPathsin interfaceorg.springframework.beans.ConfigurablePropertyAccessor
-
setAutoGrowNestedPaths
public void setAutoGrowNestedPaths(boolean autoGrowNestedPaths) - Specified by:
setAutoGrowNestedPathsin interfaceorg.springframework.beans.ConfigurablePropertyAccessor
-
isReadableProperty
- Specified by:
isReadablePropertyin interfaceorg.springframework.beans.PropertyAccessor
-
isWritableProperty
- Specified by:
isWritablePropertyin interfaceorg.springframework.beans.PropertyAccessor
-
getPropertyType
@Nullable public Class<?> getPropertyType(String propertyName) throws org.springframework.beans.BeansException - Specified by:
getPropertyTypein interfaceorg.springframework.beans.PropertyAccessor- Throws:
org.springframework.beans.BeansException
-
getPropertyTypeDescriptor
@Nullable public org.springframework.core.convert.TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws org.springframework.beans.BeansException - Specified by:
getPropertyTypeDescriptorin interfaceorg.springframework.beans.PropertyAccessor- Throws:
org.springframework.beans.BeansException
-
getPropertyValue
@Nullable public Object getPropertyValue(String propertyName) throws org.springframework.beans.BeansException - Specified by:
getPropertyValuein interfaceorg.springframework.beans.PropertyAccessor- Throws:
org.springframework.beans.BeansException
-
setPropertyValue
public void setPropertyValue(String propertyName, Object value) throws org.springframework.beans.BeansException - Specified by:
setPropertyValuein interfaceorg.springframework.beans.PropertyAccessor- Throws:
org.springframework.beans.BeansException
-
setPropertyValue
public void setPropertyValue(org.springframework.beans.PropertyValue pv) throws org.springframework.beans.BeansException - Specified by:
setPropertyValuein interfaceorg.springframework.beans.PropertyAccessor- Throws:
org.springframework.beans.BeansException
-
setPropertyValues
- Specified by:
setPropertyValuesin interfaceorg.springframework.beans.PropertyAccessor- Throws:
org.springframework.beans.BeansException
-
setPropertyValues
public void setPropertyValues(org.springframework.beans.PropertyValues pvs) throws org.springframework.beans.BeansException - Specified by:
setPropertyValuesin interfaceorg.springframework.beans.PropertyAccessor- Throws:
org.springframework.beans.BeansException
-
setPropertyValues
public void setPropertyValues(org.springframework.beans.PropertyValues pvs, boolean ignoreUnknown) throws org.springframework.beans.BeansException - Specified by:
setPropertyValuesin interfaceorg.springframework.beans.PropertyAccessor- Throws:
org.springframework.beans.BeansException
-
setPropertyValues
public void setPropertyValues(org.springframework.beans.PropertyValues pvs, boolean ignoreUnknown, boolean ignoreInvalid) throws org.springframework.beans.BeansException - Specified by:
setPropertyValuesin interfaceorg.springframework.beans.PropertyAccessor- Throws:
org.springframework.beans.BeansException
-
registerCustomEditor
- Specified by:
registerCustomEditorin interfaceorg.springframework.beans.PropertyEditorRegistry
-
registerCustomEditor
public void registerCustomEditor(Class<?> requiredType, String propertyPath, PropertyEditor propertyEditor) - Specified by:
registerCustomEditorin interfaceorg.springframework.beans.PropertyEditorRegistry
-
findCustomEditor
- Specified by:
findCustomEditorin interfaceorg.springframework.beans.PropertyEditorRegistry
-
convertIfNecessary
@Nullable public <T> T convertIfNecessary(Object value, Class<T> requiredType) throws org.springframework.beans.TypeMismatchException - Specified by:
convertIfNecessaryin interfaceorg.springframework.beans.TypeConverter- Throws:
org.springframework.beans.TypeMismatchException
-
convertIfNecessary
@Nullable public <T> T convertIfNecessary(Object value, Class<T> requiredType, org.springframework.core.MethodParameter methodParam) throws org.springframework.beans.TypeMismatchException - Specified by:
convertIfNecessaryin interfaceorg.springframework.beans.TypeConverter- Throws:
org.springframework.beans.TypeMismatchException
-
convertIfNecessary
@Nullable public <T> T convertIfNecessary(Object value, Class<T> requiredType, Field field) throws org.springframework.beans.TypeMismatchException - Specified by:
convertIfNecessaryin interfaceorg.springframework.beans.TypeConverter- Throws:
org.springframework.beans.TypeMismatchException
-
convertIfNecessary
@Nullable public <T> T convertIfNecessary(Object value, Class<T> requiredType, org.springframework.core.convert.TypeDescriptor typeDescriptor) throws org.springframework.beans.TypeMismatchException - Specified by:
convertIfNecessaryin interfaceorg.springframework.beans.TypeConverter- Throws:
org.springframework.beans.TypeMismatchException
-