Class BeanUtilUtil
java.lang.Object
jodd.bean.BeanUtilUtil
- All Implemented Interfaces:
BeanUtil
- Direct Known Subclasses:
BeanUtilBean
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClassIntrospectorprotected booleanprotected booleanprotected booleanprotected TypeConverterManagerFields inherited from interface BeanUtil
declared, declaredForced, declaredForcedSilent, declaredSilent, forced, forcedSilent, pojo, silent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectarrayForcedGet(BeanProperty bp, Object array, int index) Returns the element of an array forced.protected voidarrayForcedSet(BeanProperty bp, Object array, int index, Object value) Sets the array element forced.protected ObjectconvertIndexToMapKey(Getter getter, Object index) Converts Map index to key type.protected ObjectconvertToCollection(Object value, Class destinationType, Class componentType) Converter to collection.protected ObjectconvertType(Object value, Class type) Converts object to destination type.protected ObjectCreates new instance for current property name through its setter.protected ObjectensureArraySize(BeanProperty bp, Object array, Class componentType, int index) protected voidensureListSize(List list, int size) protected ClassextractGenericComponentType(Getter getter) Extracts generic component type of a property.protected StringExtract index string from non-nested property name.protected ClassExtracts type of current property.protected intindexOfDot(String name) Finds the very first next dot.protected ObjectinvokeSetter(Setter setter, BeanProperty bp, Object value) Invokes setter, but first converts type to match the setter type.protected intparseInt(String indexString, BeanProperty bp) voidsetIntrospector(ClassIntrospector introspector) Setsintrospectorimplementation.voidsetTypeConverterManager(TypeConverterManager typeConverterManager) Setstype converter managerimplementation.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BeanUtil
extractThisReference, getIndexProperty, getProperty, getPropertyType, getSimpleProperty, hasProperty, hasRootProperty, hasSimpleProperty, setIndexProperty, setProperty, setSimpleProperty
-
Field Details
-
isDeclared
protected boolean isDeclared -
isForced
protected boolean isForced -
isSilent
protected boolean isSilent -
introspector
-
typeConverterManager
-
-
Constructor Details
-
BeanUtilUtil
BeanUtilUtil()
-
-
Method Details
-
setIntrospector
Setsintrospectorimplementation. -
setTypeConverterManager
Setstype converter managerimplementation. -
convertType
-
convertToCollection
-
invokeSetter
Invokes setter, but first converts type to match the setter type. -
arrayForcedGet
Returns the element of an array forced. If value isnull, it will be instantiated. If not the last part of indexed bean property, array will be expanded to the index if necessary. -
arrayForcedSet
Sets the array element forced. If index is greater then arrays length, array will be expanded to the index. If speed is critical, it is better to allocate an array with proper size before using this method. -
ensureArraySize
-
ensureListSize
-
indexOfDot
Finds the very first next dot. Ignores dots between index brackets. Returns-1when dot is not found. -
extractIndex
Extract index string from non-nested property name. If index is found, it is stripped from bean property name. If no index is found, it returnsnull. -
parseInt
-
createBeanProperty
Creates new instance for current property name through its setter. It uses default constructor! -
extractGenericComponentType
-
convertIndexToMapKey
-
extractType
Extracts type of current property.
-