public interface FieldBuilder
Field
instances.
An instance of this object must not be used concurrently (an object has a state).Modifier and Type | Method and Description |
---|---|
FieldBuilder |
add(String name,
Field field)
Add a
Field (e.g. |
FieldBuilder |
add(String name,
ScalarType scalarType)
Add a
Scalar . |
FieldBuilder |
addArray(String name,
Field element)
Add array of
Field elements. |
FieldBuilder |
addArray(String name,
ScalarType scalarType)
Add array of
Scalar elements. |
FieldBuilder |
addNestedStructure(String name)
Add new nested
Structure . |
FieldBuilder |
addNestedStructureArray(String name)
Add new nested
Structure[] . |
FieldBuilder |
addNestedUnion(String name)
Add new nested
Union . |
FieldBuilder |
addNestedUnionArray(String name)
Add new nested
Union[] . |
Structure |
createStructure()
Create a
Structure . |
Union |
createUnion()
Create an
Union . |
FieldBuilder |
endNested()
Complete the creation of a nested object.
|
FieldBuilder |
setId(String id)
Set ID of an object to be created.
|
FieldBuilder setId(String id)
id
- id to be set.FieldBuilder
.FieldBuilder add(String name, ScalarType scalarType)
Scalar
.name
- name of the array.scalarType
- type of a scalar to add.FieldBuilder
.FieldBuilder add(String name, Field field)
Field
(e.g. Structure
, Union
).name
- name of the array.field
- a field to add.FieldBuilder
.FieldBuilder addArray(String name, ScalarType scalarType)
Scalar
elements.name
- name of the array.scalarType
- type of a scalar element.FieldBuilder
.FieldBuilder addArray(String name, Field element)
Field
elements.name
- name of the array.field
- a type of an array element.FieldBuilder
.Structure createStructure()
Structure
.
This resets this instance state and allows new Field
instance to be created.Structure
.Union createUnion()
Union
.
This resets this instance state and allows new Field
instance to be created.Union
.FieldBuilder addNestedStructure(String name)
Structure
.
createNested()
method must be called
to complete creation of the nested Structure
.name
- nested structure name.FieldBuilder
is returned.endNested()
FieldBuilder addNestedUnion(String name)
Union
.
createNested()
method must be called
to complete creation of the nested Union
.name
- nested union name.FieldBuilder
is returned.endNested()
FieldBuilder addNestedStructureArray(String name)
Structure[]
.
createNested()
method must be called
to complete creation of the nested Structure
.name
- nested structure name.FieldBuilder
is returned.endNested()
FieldBuilder addNestedUnionArray(String name)
Union[]
.
createNested()
method must be called
to complete creation of the nested Union
.name
- nested union name.FieldBuilder
is returned.endNested()
FieldBuilder endNested()
FieldBuilder
.addNestedStructure(String)
,
addNestedUnion(String)
Copyright © 2014. All Rights Reserved.