Package org.epics.pvdata.pv
Interface FieldBuilder
-
- All Known Implementing Classes:
BaseFieldBuilder
public interface FieldBuilderInterface for in-line creating of introspection interfaces. One instance can be used to create multipleFieldinstances. An instance of this object must not be used concurrently (an object has a state).- Author:
- mse
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FieldBuilderadd(String name, Field field)Add aField(e.g.FieldBuilderadd(String name, ScalarType scalarType)Add aScalar.FieldBuilderaddArray(String name, Field field)Add array ofFieldelements.FieldBuilderaddArray(String name, ScalarType scalarType)Add variable size array ofScalarelements.FieldBuilderaddBoundedArray(String name, ScalarType scalarType, int bound)Add bounded-size array ofScalarelements.FieldBuilderaddBoundedString(String name, int maxLength)Add a bounded string.FieldBuilderaddFixedArray(String name, ScalarType scalarType, int size)Add fixed-size array ofScalarelements.FieldBuilderaddNestedStructure(String name)Add new nestedStructure.FieldBuilderaddNestedStructureArray(String name)Add new nestedStructure[].FieldBuilderaddNestedUnion(String name)Add new nestedUnion.FieldBuilderaddNestedUnionArray(String name)Add new nestedUnion[].StructurecreateStructure()Create aStructure.UnioncreateUnion()Create anUnion.FieldBuilderendNested()Complete the creation of a nested object.FieldBuildersetId(String id)Set ID of an object to be created.
-
-
-
Method Detail
-
setId
FieldBuilder setId(String id)
Set ID of an object to be created.- Parameters:
id- the id to be set- Returns:
- this instance of a
FieldBuilder
-
add
FieldBuilder add(String name, ScalarType scalarType)
Add aScalar.- Parameters:
name- the name of the arrayscalarType- the type of the scalar to add- Returns:
- this instance of a
FieldBuilder
-
addBoundedString
FieldBuilder addBoundedString(String name, int maxLength)
Add a bounded string.- Parameters:
name- the name of the bounded stringmaxLength- the maximum string length- Returns:
- this instance of a
FieldBuilder
-
add
FieldBuilder add(String name, Field field)
Add aField(e.g.Structure,Union).- Parameters:
name- the name of the arrayfield- a field to add- Returns:
- this instance of a
FieldBuilder
-
addArray
FieldBuilder addArray(String name, ScalarType scalarType)
Add variable size array ofScalarelements.- Parameters:
name- the name of the arrayscalarType- the type of the scalar element- Returns:
- this instance of a
FieldBuilder
-
addFixedArray
FieldBuilder addFixedArray(String name, ScalarType scalarType, int size)
Add fixed-size array ofScalarelements.- Parameters:
name- the name of the arrayscalarType- type of the scalar elementsize- the size of the Array to add- Returns:
- this instance of a
FieldBuilder
-
addBoundedArray
FieldBuilder addBoundedArray(String name, ScalarType scalarType, int bound)
Add bounded-size array ofScalarelements.- Parameters:
name- the name of the arrayscalarType- the type of the scalar elementbound- the maximum capacity (size) of the array- Returns:
- this instance of a
FieldBuilder
-
addArray
FieldBuilder addArray(String name, Field field)
Add array ofFieldelements.- Parameters:
name- the name of the arrayfield- the type of each array element- Returns:
- this instance of a
FieldBuilder
-
createStructure
Structure createStructure()
Create aStructure. This resets this instance state and allows newFieldinstance to be created.- Returns:
- the new instance of a
Structurecreated
-
createUnion
Union createUnion()
Create anUnion. This resets this instance state and allows newFieldinstance to be created.- Returns:
- the new instance of an
Unioncreated
-
addNestedStructure
FieldBuilder addNestedStructure(String name)
Add new nestedStructure.createNested()method must be called to complete creation of the nestedStructure.- Parameters:
name- the nested structure name- Returns:
- a new instance of a
FieldBuilderis returned - See Also:
endNested()
-
addNestedUnion
FieldBuilder addNestedUnion(String name)
Add new nestedUnion.createNested()method must be called to complete creation of the nestedUnion.- Parameters:
name- the nested union name- Returns:
- a new instance of a
FieldBuilderis returned - See Also:
endNested()
-
addNestedStructureArray
FieldBuilder addNestedStructureArray(String name)
Add new nestedStructure[].createNested()method must be called to complete creation of the nestedStructure.- Parameters:
name- the nested structure array name- Returns:
- a new instance of a
FieldBuilderis returned - See Also:
endNested()
-
addNestedUnionArray
FieldBuilder addNestedUnionArray(String name)
Add new nestedUnion[].createNested()method must be called to complete creation of the nestedUnion.- Parameters:
name- the nested union array name.- Returns:
- a new instance of a
FieldBuilderis returned. - See Also:
endNested()
-
endNested
FieldBuilder endNested()
Complete the creation of a nested object.- Returns:
- a previous (parent)
FieldBuilder. - See Also:
addNestedStructure(String),addNestedUnion(String)
-
-