Package org.beanio.builder
Class SegmentBuilder
- java.lang.Object
-
- org.beanio.builder.PropertyBuilderSupport<T>
-
- org.beanio.builder.SegmentBuilderSupport<SegmentBuilder>
-
- org.beanio.builder.SegmentBuilder
-
public class SegmentBuilder extends SegmentBuilderSupport<SegmentBuilder>
Builds a new segment configuration.- Since:
- 2.1.0
-
-
Field Summary
Fields Modifier and Type Field Description protected SegmentConfig
config
-
Constructor Summary
Constructors Constructor Description SegmentBuilder(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentBuilder
at(int at)
Sets the position of the field.SegmentConfig
build()
Builds the segment configuration.protected SegmentConfig
getConfig()
Returns the configuration settings.protected SegmentBuilder
me()
Returns this.SegmentBuilder
nillable()
Indicates the XML element is nillable.SegmentBuilder
occursRef(java.lang.String ref)
Indicates the number of occurrences of this segment is governed by another field.-
Methods inherited from class org.beanio.builder.SegmentBuilderSupport
addField, addSegment, key, value
-
Methods inherited from class org.beanio.builder.PropertyBuilderSupport
collection, getter, lazy, maxOccurs, minOccurs, occurs, occurs, setter, type, xmlName, xmlNamespace, xmlPrefix, xmlType
-
-
-
-
Field Detail
-
config
protected SegmentConfig config
-
-
Method Detail
-
getConfig
protected SegmentConfig getConfig()
Description copied from class:PropertyBuilderSupport
Returns the configuration settings.- Specified by:
getConfig
in classSegmentBuilderSupport<SegmentBuilder>
- Returns:
- the configuration
-
me
protected SegmentBuilder me()
Description copied from class:PropertyBuilderSupport
Returns this.- Specified by:
me
in classPropertyBuilderSupport<SegmentBuilder>
- Returns:
- this
-
at
public SegmentBuilder at(int at)
Sets the position of the field.- Parameters:
at
- the position- Returns:
- this
-
occursRef
public SegmentBuilder occursRef(java.lang.String ref)
Indicates the number of occurrences of this segment is governed by another field.- Parameters:
ref
- the name of the field that governs the occurrences of this segment- Returns:
- this
-
nillable
public SegmentBuilder nillable()
Indicates the XML element is nillable.- Returns:
- this
-
build
public SegmentConfig build()
Builds the segment configuration.- Returns:
- the segment configuration
-
-