public class JuffrouSpringBeanWrapper
extends net.sf.juffrou.reflect.JuffrouBeanWrapper
implements org.springframework.beans.BeanWrapper
Constructor and Description |
---|
JuffrouSpringBeanWrapper(net.sf.juffrou.reflect.BeanWrapperContext context) |
JuffrouSpringBeanWrapper(net.sf.juffrou.reflect.BeanWrapperContext context,
net.sf.juffrou.reflect.JuffrouBeanWrapper parentBeanWrapper,
String parentBeanProperty) |
JuffrouSpringBeanWrapper(net.sf.juffrou.reflect.BeanWrapperContext context,
Object instance) |
JuffrouSpringBeanWrapper(Class<?> clazz) |
JuffrouSpringBeanWrapper(Object instance) |
Modifier and Type | Method and Description |
---|---|
<T> T |
convertIfNecessary(Object value,
Class<T> requiredType) |
<T> T |
convertIfNecessary(Object value,
Class<T> requiredType,
org.springframework.core.MethodParameter methodParam) |
PropertyEditor |
findCustomEditor(Class<?> requiredType,
String propertyPath) |
int |
getAutoGrowCollectionLimit() |
org.springframework.core.convert.ConversionService |
getConversionService() |
PropertyEditor |
getDefaultEditor(Class<?> requiredType)
Retrieve the default editor for the given property type, if any.
|
PropertyDescriptor |
getPropertyDescriptor(String propertyName) |
PropertyDescriptor[] |
getPropertyDescriptors() |
Class |
getPropertyType(String propertyName) |
org.springframework.core.convert.TypeDescriptor |
getPropertyTypeDescriptor(String propertyName) |
Object |
getPropertyValue(String propertyName) |
Class |
getWrappedClass() |
Object |
getWrappedInstance() |
boolean |
hasCustomEditorForElement(Class<?> elementType,
String propertyPath)
Determine whether this registry contains a custom editor for the specified array/collection element.
|
boolean |
isAutoGrowNestedPaths() |
boolean |
isExtractOldValueForEditor() |
boolean |
isReadableProperty(String propertyName) |
boolean |
isSharedEditor(PropertyEditor propertyEditor)
Check whether the given editor instance is a shared editor, that is, whether the given editor instance might be
used concurrently.
|
boolean |
isWritableProperty(String propertyName) |
void |
registerCustomEditor(Class<?> requiredType,
PropertyEditor propertyEditor) |
void |
registerCustomEditor(Class<?> requiredType,
String propertyPath,
PropertyEditor propertyEditor) |
void |
setAutoGrowCollectionLimit(int autoGrowCollectionLimit) |
void |
setAutoGrowNestedPaths(boolean autoGrowNestedPaths) |
void |
setBean(Object bean) |
void |
setConversionService(org.springframework.core.convert.ConversionService conversionService) |
void |
setExtractOldValueForEditor(boolean extractOldValueForEditor) |
void |
setPropertyValue(org.springframework.beans.PropertyValue pv) |
void |
setPropertyValue(String propertyName,
Object value) |
void |
setPropertyValues(Map<?,?> map) |
void |
setPropertyValues(org.springframework.beans.PropertyValues pvs) |
void |
setPropertyValues(org.springframework.beans.PropertyValues pvs,
boolean ignoreUnknown) |
void |
setPropertyValues(org.springframework.beans.PropertyValues pvs,
boolean ignoreUnknown,
boolean ignoreInvalid) |
void |
useConfigValueEditors()
Activate config value editors which are only intended for configuration purposes, such as
StringArrayPropertyEditor . |
addElement, getBean, getBean, getBeanClass, getClazz, getContext, getFactory, getField, getLocalNestedWrapper, getNestedWrapper, getNestedWrappers, getParentBeanProperty, getParentBeanWrapper, getPropertyNames, getType, getTypeArguments, getValue, hasProperty, removeElement, setValue, setValueOfString, toString
public JuffrouSpringBeanWrapper(net.sf.juffrou.reflect.BeanWrapperContext context, net.sf.juffrou.reflect.JuffrouBeanWrapper parentBeanWrapper, String parentBeanProperty)
public JuffrouSpringBeanWrapper(net.sf.juffrou.reflect.BeanWrapperContext context, Object instance)
public JuffrouSpringBeanWrapper(net.sf.juffrou.reflect.BeanWrapperContext context)
public JuffrouSpringBeanWrapper(Class<?> clazz)
public JuffrouSpringBeanWrapper(Object instance)
public void setBean(Object bean)
setBean
in class net.sf.juffrou.reflect.JuffrouBeanWrapper
public void setConversionService(org.springframework.core.convert.ConversionService conversionService)
setConversionService
in interface org.springframework.beans.ConfigurablePropertyAccessor
public org.springframework.core.convert.ConversionService getConversionService()
getConversionService
in interface org.springframework.beans.ConfigurablePropertyAccessor
public void setExtractOldValueForEditor(boolean extractOldValueForEditor)
setExtractOldValueForEditor
in interface org.springframework.beans.ConfigurablePropertyAccessor
public boolean isExtractOldValueForEditor()
isExtractOldValueForEditor
in interface org.springframework.beans.ConfigurablePropertyAccessor
public boolean isReadableProperty(String propertyName)
isReadableProperty
in interface org.springframework.beans.PropertyAccessor
public boolean isWritableProperty(String propertyName)
isWritableProperty
in interface org.springframework.beans.PropertyAccessor
public Class getPropertyType(String propertyName) throws org.springframework.beans.BeansException
getPropertyType
in interface org.springframework.beans.PropertyAccessor
org.springframework.beans.BeansException
public org.springframework.core.convert.TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws org.springframework.beans.BeansException
getPropertyTypeDescriptor
in interface org.springframework.beans.PropertyAccessor
org.springframework.beans.BeansException
public Object getPropertyValue(String propertyName) throws org.springframework.beans.BeansException
getPropertyValue
in interface org.springframework.beans.PropertyAccessor
org.springframework.beans.BeansException
public void setPropertyValue(String propertyName, Object value) throws org.springframework.beans.BeansException
setPropertyValue
in interface org.springframework.beans.PropertyAccessor
org.springframework.beans.BeansException
public void setPropertyValue(org.springframework.beans.PropertyValue pv) throws org.springframework.beans.BeansException
setPropertyValue
in interface org.springframework.beans.PropertyAccessor
org.springframework.beans.BeansException
public void setPropertyValues(Map<?,?> map) throws org.springframework.beans.BeansException
setPropertyValues
in interface org.springframework.beans.PropertyAccessor
org.springframework.beans.BeansException
public void setPropertyValues(org.springframework.beans.PropertyValues pvs) throws org.springframework.beans.BeansException
setPropertyValues
in interface org.springframework.beans.PropertyAccessor
org.springframework.beans.BeansException
public void setPropertyValues(org.springframework.beans.PropertyValues pvs, boolean ignoreUnknown) throws org.springframework.beans.BeansException
setPropertyValues
in interface org.springframework.beans.PropertyAccessor
org.springframework.beans.BeansException
public void setPropertyValues(org.springframework.beans.PropertyValues pvs, boolean ignoreUnknown, boolean ignoreInvalid) throws org.springframework.beans.BeansException
setPropertyValues
in interface org.springframework.beans.PropertyAccessor
org.springframework.beans.BeansException
public void registerCustomEditor(Class<?> requiredType, PropertyEditor propertyEditor)
registerCustomEditor
in interface org.springframework.beans.PropertyEditorRegistry
public void registerCustomEditor(Class<?> requiredType, String propertyPath, PropertyEditor propertyEditor)
registerCustomEditor
in interface org.springframework.beans.PropertyEditorRegistry
public PropertyEditor findCustomEditor(Class<?> requiredType, String propertyPath)
findCustomEditor
in interface org.springframework.beans.PropertyEditorRegistry
public boolean hasCustomEditorForElement(Class<?> elementType, String propertyPath)
elementType
- the target type of the element (can be null
if not known)propertyPath
- the property path (typically of the array/collection; can be null
if not known)public boolean isSharedEditor(PropertyEditor propertyEditor)
propertyEditor
- the editor instance to checkpublic PropertyEditor getDefaultEditor(Class<?> requiredType)
Lazily registers the default editors, if they are active.
requiredType
- type of the propertynull
if none foundregisterCustomEditor(Class, PropertyEditor)
public void useConfigValueEditors()
StringArrayPropertyEditor
.
Those editors are not registered by default simply because they are in general inappropriate for data binding
purposes. Of course, you may register them individually in any case, through registerCustomEditor(java.lang.Class<?>, java.beans.PropertyEditor)
.
public <T> T convertIfNecessary(Object value, Class<T> requiredType) throws org.springframework.beans.TypeMismatchException
convertIfNecessary
in interface org.springframework.beans.TypeConverter
org.springframework.beans.TypeMismatchException
public <T> T convertIfNecessary(Object value, Class<T> requiredType, org.springframework.core.MethodParameter methodParam) throws org.springframework.beans.TypeMismatchException
convertIfNecessary
in interface org.springframework.beans.TypeConverter
org.springframework.beans.TypeMismatchException
public Object getWrappedInstance()
getWrappedInstance
in interface org.springframework.beans.BeanWrapper
public Class getWrappedClass()
getWrappedClass
in interface org.springframework.beans.BeanWrapper
public PropertyDescriptor[] getPropertyDescriptors()
getPropertyDescriptors
in interface org.springframework.beans.BeanWrapper
public PropertyDescriptor getPropertyDescriptor(String propertyName) throws org.springframework.beans.InvalidPropertyException
getPropertyDescriptor
in interface org.springframework.beans.BeanWrapper
org.springframework.beans.InvalidPropertyException
public void setAutoGrowNestedPaths(boolean autoGrowNestedPaths)
setAutoGrowNestedPaths
in interface org.springframework.beans.BeanWrapper
public boolean isAutoGrowNestedPaths()
isAutoGrowNestedPaths
in interface org.springframework.beans.BeanWrapper
public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit)
setAutoGrowCollectionLimit
in interface org.springframework.beans.BeanWrapper
public int getAutoGrowCollectionLimit()
getAutoGrowCollectionLimit
in interface org.springframework.beans.BeanWrapper
Copyright © 2011–2020 Juffrou. All rights reserved.