public final class ZserioTreeCreator
extends java.lang.Object
Constructor and Description |
---|
ZserioTreeCreator(TypeInfo typeInfo,
java.lang.Object... arguments)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addValueElement(java.lang.Object value)
Adds the value to the array.
|
void |
beginArray(java.lang.String name)
Creates an array field within the current compound.
|
void |
beginCompound(java.lang.String name)
Creates a compound field within the current compound.
|
void |
beginCompoundElement()
Creates compound array element within the current array.
|
void |
beginRoot()
Creates the top level compound element and move to state of building its children.
|
void |
endArray()
Finishes the array field.
|
void |
endCompound()
Finishes the compound.
|
void |
endCompoundElement()
Finishes the compound element.
|
java.lang.Object |
endRoot()
Finishes building and returns the created tree.
|
TypeInfo |
getElementType()
Gets type info of the expected array element.
|
TypeInfo |
getFieldType(java.lang.String name)
Gets type info of the expected field.
|
void |
setValue(java.lang.String name,
java.lang.Object value)
Sets field value within the current compound.
|
public ZserioTreeCreator(TypeInfo typeInfo, java.lang.Object... arguments)
typeInfo
- Type info defining the tree.arguments
- Arguments of type which defines the tree.public void beginRoot()
public java.lang.Object endRoot()
public void beginArray(java.lang.String name)
name
- Name of the array field.public void endArray()
public void beginCompound(java.lang.String name)
name
- Name of the compound field.public void endCompound()
public void setValue(java.lang.String name, java.lang.Object value)
name
- Name of the field.value
- Value to set.public TypeInfo getFieldType(java.lang.String name)
name
- Field name.public void beginCompoundElement()
public void endCompoundElement()
public void addValueElement(java.lang.Object value)
value
- Value to add.public TypeInfo getElementType()
Last updated 2024-12-05 10:34:50