Package org.beanio.internal.config
Class ConstantConfig
- java.lang.Object
-
- org.beanio.internal.util.TreeNode<ComponentConfig>
-
- org.beanio.internal.config.ComponentConfig
-
- org.beanio.internal.config.PropertyConfig
-
- org.beanio.internal.config.SimplePropertyConfig
-
- org.beanio.internal.config.ConstantConfig
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Iterable<ComponentConfig>
,Replicateable
public class ConstantConfig extends SimplePropertyConfig
A constant component is used to add a property value to a bean object that is not bound to any field in a stream. During marshalling, constants can be used to identify the record mapping for a bean object ifidentifier
is set to true.- 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 ConstantConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char
getComponentType()
Returns the component type.java.lang.String
getValue()
Returns the textual representation of this fixed property value.void
setValue(java.lang.String value)
Sets the textual representation of this fixed property value.-
Methods inherited from class org.beanio.internal.config.SimplePropertyConfig
getFormat, getTypeHandler, getTypeHandlerInstance, setFormat, setTypeHandler, setTypeHandlerInstance
-
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
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
-
getComponentType
public char getComponentType()
Description copied from class:ComponentConfig
Returns the component type.- Specified by:
getComponentType
in classComponentConfig
- Returns:
- one of
ComponentConfig.GROUP
,ComponentConfig.RECORD
,ComponentConfig.SEGMENT
,ComponentConfig.FIELD
,ComponentConfig.CONSTANT
orComponentConfig.WRAPPER
-
getValue
public java.lang.String getValue()
Returns the textual representation of this fixed property value.- Returns:
- the property value text
-
setValue
public void setValue(java.lang.String value)
Sets the textual representation of this fixed property value.- Parameters:
value
- the property value text
-
-