Package org.beanio.internal.config
Class SimplePropertyConfig
- java.lang.Object
-
- org.beanio.internal.util.TreeNode<ComponentConfig>
-
- org.beanio.internal.config.ComponentConfig
-
- org.beanio.internal.config.PropertyConfig
-
- org.beanio.internal.config.SimplePropertyConfig
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Iterable<ComponentConfig>
,Replicateable
- Direct Known Subclasses:
ConstantConfig
,FieldConfig
public abstract class SimplePropertyConfig extends PropertyConfig
A base class for configuration components that can be bound to "simple attributes" of a bean object. A simple attribute is one that does not have any child properties itself and can be derived using aTypeHandler
.- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class org.beanio.internal.config.PropertyConfig
JSON_TYPE_ARRAY, JSON_TYPE_BOOLEAN, JSON_TYPE_NONE, JSON_TYPE_NUMBER, JSON_TYPE_OBJECT, JSON_TYPE_STRING
-
-
Constructor Summary
Constructors Constructor Description SimplePropertyConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFormat()
Returns the pattern used by date and number type handlers to parse and format the property value.java.lang.String
getTypeHandler()
Returns the name of the custom type handler used for type conversion by this component, ornull
if the default type handler is sufficient.TypeHandler
getTypeHandlerInstance()
Returns the type handler.void
setFormat(java.lang.String format)
Sets the pattern used by date and number type handlers to parse and format the property value.void
setTypeHandler(java.lang.String handler)
Sets the name of the custom type handler to use for type conversion by this component.void
setTypeHandlerInstance(TypeHandler typeHandlerInstance)
Sets the type handler.-
Methods inherited from class org.beanio.internal.config.PropertyConfig
getCollection, getGetter, getJsonArrayIndex, getJsonName, getJsonType, getKey, getLabel, getMaxOccurs, getMaxOccursRef, getMaxSize, getMinOccurs, getMinOccursRef, getMinSize, getOccursRef, getPosition, getSetter, getType, getUntil, getXmlType, isBound, isCollection, isIdentifier, isJsonArray, isLazy, isNillable, isRepeating, isSupportedChild, setBound, setCollection, setGetter, setIdentifier, setJsonArray, setJsonArrayIndex, setJsonName, setJsonType, setLabel, setLazy, setMaxOccurs, setMaxOccursRef, setMaxSize, setMinOccurs, setMinOccursRef, setMinSize, setNillable, setOccursRef, setPosition, setSetter, setType, setUntil, setXmlType
-
Methods inherited from class org.beanio.internal.config.ComponentConfig
getComponentType, getOrdinal, getXmlName, getXmlNamespace, getXmlPrefix, isXmlNamespaceAware, setOrdinal, setXmlName, setXmlNamespace, setXmlNamespaceAware, setXmlPrefix
-
Methods inherited from class org.beanio.internal.util.TreeNode
add, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toParamString, toString, updateReferences
-
-
-
-
Method Detail
-
getTypeHandler
public java.lang.String getTypeHandler()
Returns the name of the custom type handler used for type conversion by this component, ornull
if the default type handler is sufficient.- Returns:
- the name of a custom type handler
-
setTypeHandler
public void setTypeHandler(java.lang.String handler)
Sets the name of the custom type handler to use for type conversion by this component. Set tonull
if the default type handler is sufficient.- Parameters:
handler
- the name of a custom type handler
-
getTypeHandlerInstance
public TypeHandler getTypeHandlerInstance()
Returns the type handler.- Returns:
- the
TypeHandler
-
setTypeHandlerInstance
public void setTypeHandlerInstance(TypeHandler typeHandlerInstance)
Sets the type handler.- Parameters:
typeHandlerInstance
- theTypeHandler
-
getFormat
public java.lang.String getFormat()
Returns the pattern used by date and number type handlers to parse and format the property value.- Returns:
- the date or number format pattern
- See Also:
SimpleDateFormat
,DecimalFormat
-
setFormat
public void setFormat(java.lang.String format)
Sets the pattern used by date and number type handlers to parse and format the property value.- Parameters:
format
- the date or number format pattern- See Also:
SimpleDateFormat
,DecimalFormat
-
-