Package org.epics.pvdata.pv
Interface FieldCreate
-
public interface FieldCreateInterface for creating introspection interfaces.- Author:
- mrk
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StructureappendField(Structure structure, String fieldName, Field field)Append a field to a structure.StructureappendFields(Structure structure, String[] fieldNames, Field[] fields)Append fields to a structure.ScalarArraycreateBoundedScalarArray(ScalarType elementType, int bound)Create an Array field, bounded size array.BoundedStringcreateBoundedString(int maxLength)Create a BoundedString.FieldBuildercreateFieldBuilder()Create a new instance of in-lineFieldbuilder.ScalarArraycreateFixedScalarArray(ScalarType elementType, int size)Create an Array field, fixed size array.ScalarcreateScalar(ScalarType scalarType)Create a ScalarField.ScalarArraycreateScalarArray(ScalarType elementType)Create an Array field, variable size arrayStructurecreateStructure(String[] fieldNames, Field[] fields)Create a Structure field.StructurecreateStructure(String id, String[] fieldNames, Field[] fields)Create a Structure field with an identification.StructurecreateStructure(Structure structToClone)Create a Structure field.StructureArraycreateStructureArray(Structure elementStructure)Create an Array field that is has element type StructureUnioncreateUnion(String[] fieldNames, Field[] fields)Create an Union field.UnioncreateUnion(String id, String[] fieldNames, Field[] fields)Create an Union field with an identification.UnionArraycreateUnionArray(Union elementUnion)Create an Array field that is has element type UnionUnioncreateVariantUnion()Create a variant Union (aka any type) field.UnionArraycreateVariantUnionArray()Create a variant UnionArray (aka any type) field.Fielddeserialize(ByteBuffer buffer, DeserializableControl control)Deserialize Field instance from given byte buffer
-
-
-
Method Detail
-
createFieldBuilder
FieldBuilder createFieldBuilder()
Create a new instance of in-lineFieldbuilder.- Returns:
- a new instance of a
FieldBuilder
-
createScalar
Scalar createScalar(ScalarType scalarType)
Create a ScalarField.- Parameters:
scalarType- the scalar type- Returns:
- a Scalar interface for the newly created object
- Throws:
IllegalArgumentException- if an illegal type is specified
-
createBoundedString
BoundedString createBoundedString(int maxLength)
Create a BoundedString.- Parameters:
maxLength- the maximum string length- Returns:
- a BoundedScalar interface for the newly created object
- Throws:
IllegalArgumentException- if maxLength <= 0
-
createScalarArray
ScalarArray createScalarArray(ScalarType elementType)
Create an Array field, variable size array- Parameters:
elementType- the scalarType for array elements- Returns:
- an Array interface for the newly created object
-
createFixedScalarArray
ScalarArray createFixedScalarArray(ScalarType elementType, int size)
Create an Array field, fixed size array.- Parameters:
elementType- The scalarType for array elementssize- the fixed array size- Returns:
- an Array interface for the newly created object
-
createBoundedScalarArray
ScalarArray createBoundedScalarArray(ScalarType elementType, int bound)
Create an Array field, bounded size array.- Parameters:
elementType- The scalarType for array elementsbound- the array maximum capacity (bound)- Returns:
- an Array interface for the newly created object
-
createStructureArray
StructureArray createStructureArray(Structure elementStructure)
Create an Array field that is has element type Structure- Parameters:
elementStructure- the Structure for each array element- Returns:
- an Array interface for the newly created object
-
createUnionArray
UnionArray createUnionArray(Union elementUnion)
Create an Array field that is has element type Union- Parameters:
elementUnion- the Union for each array element- Returns:
- an Array interface for the newly created object
-
createVariantUnionArray
UnionArray createVariantUnionArray()
Create a variant UnionArray (aka any type) field.- Returns:
- a UnionArray interface for the newly created object
-
createStructure
Structure createStructure(String[] fieldNames, Field[] fields)
Create a Structure field.- Parameters:
fieldNames- the array of field names for the structurefields- the array of fields for the structure- Returns:
- a Structure interface for the newly created object
-
createStructure
Structure createStructure(String id, String[] fieldNames, Field[] fields)
Create a Structure field with an identification.- Parameters:
id- the identification string for the structurefieldNames- the array of field names for the structurefields- the array of fields for the structure- Returns:
- a Structure interface for the newly created object
-
appendField
Structure appendField(Structure structure, String fieldName, Field field)
Append a field to a structure.- Parameters:
structure- the structure to which the field is appendedfieldName- the name for the appended fieldfield- the appended field- Returns:
- The new structure
-
appendFields
Structure appendFields(Structure structure, String[] fieldNames, Field[] fields)
Append fields to a structure.- Parameters:
structure- the structure to which the fields are appendedfieldNames- the names for the appended fieldsfields- the appended fields- Returns:
- the new structure
-
createStructure
Structure createStructure(Structure structToClone)
Create a Structure field.- Parameters:
structToClone- the structure to clone- Returns:
- a Structure interface for the newly created object
-
createVariantUnion
Union createVariantUnion()
Create a variant Union (aka any type) field.- Returns:
- a Union interface for the newly created object
-
createUnion
Union createUnion(String[] fieldNames, Field[] fields)
Create an Union field.- Parameters:
fieldNames- the array of field names for the unionfields- the array of fields for the union- Returns:
- a Union interface for the newly created object
-
createUnion
Union createUnion(String id, String[] fieldNames, Field[] fields)
Create an Union field with an identification.- Parameters:
id- the identification string for the unionfieldNames- the array of field names for the unionfields- the array of fields for the union- Returns:
- a Union interface for the newly created object
-
deserialize
Field deserialize(ByteBuffer buffer, DeserializableControl control)
Deserialize Field instance from given byte buffer- Parameters:
buffer- the buffer containing serialized Field instancecontrol- the deserialization control instance- Returns:
- a deserialized Field instance
-
-