Class BeanVisitor
java.lang.Object
jodd.bean.BeanVisitor
Visitor for bean properties. It extracts properties names
from the source bean and then visits one by one.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanFlag for enabling declared properties, or just public ones.protected booleanDefines if empty string should be ignored.protected booleanDefines if null values should be ignored.protected booleanDefines if fields should be included.protected final booleanIndicates the the source is a Map.protected final ObjectSource bean. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeclared(boolean declared) Defines if all properties should be copied (when set totrue) or only public (when set tofalse, default).protected String[]getAllBeanPropertyNames(Class type, boolean declared) Returns all bean property names.ignoreEmptyString(boolean ignoreEmptyString) Defines ifempty stringshould be ignored.ignoreNulls(boolean ignoreNulls) Defines ifnullvalues should be ignored.includeFields(boolean includeFields) Defines if fields without getters should be copied too.protected String[]resolveProperties(Object bean, boolean declared) Returns an array of bean properties.voidvisit(BiConsumer<String, Object> propertyConsumer) Starts visiting properties.
-
Field Details
-
source
Source bean. -
declared
protected boolean declaredFlag for enabling declared properties, or just public ones. -
ignoreNullValues
protected boolean ignoreNullValuesDefines if null values should be ignored. -
ignoreEmptyString
protected boolean ignoreEmptyStringDefines if empty string should be ignored. -
includeFields
protected boolean includeFieldsDefines if fields should be included. -
isSourceMap
protected final boolean isSourceMapIndicates the the source is a Map.
-
-
Constructor Details
-
BeanVisitor
-
-
Method Details
-
ignoreNulls
Defines ifnullvalues should be ignored. -
ignoreEmptyString
Defines ifempty stringshould be ignored. -
declared
Defines if all properties should be copied (when set totrue) or only public (when set tofalse, default). -
includeFields
Defines if fields without getters should be copied too. -
getAllBeanPropertyNames
-
resolveProperties
-
visit
Starts visiting properties.
-