public class FieldBuilder
extends java.lang.Object
| Constructor and Description |
|---|
FieldBuilder(int fieldType)
Initializes a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
FieldBuilder |
addArgument(double argument)
Adds a field's argument.
|
FieldBuilder |
addArgument(FieldArgumentBuilder argument)
Adds a field's argument represented by
FieldArgumentBuilder to the field's code. |
FieldBuilder |
addArgument(FieldBuilder argument)
Adds a child field represented by another
FieldBuilder to the field's code. |
FieldBuilder |
addArgument(int argument)
Adds a field's argument.
|
FieldBuilder |
addArgument(java.lang.String argument)
Adds a field's argument.
|
FieldBuilder |
addSwitch(java.lang.String switchName)
Adds a field's switch.
|
FieldBuilder |
addSwitch(java.lang.String switchName,
double switchArgument)
Adds a field's switch.
|
FieldBuilder |
addSwitch(java.lang.String switchName,
int switchArgument)
Adds a field's switch.
|
FieldBuilder |
addSwitch(java.lang.String switchName,
java.lang.String switchArgument)
Adds a field's switch.
|
Field |
buildAndInsert(Inline refNode)
Builds and inserts a field into the document before the specified inline node.
|
Field |
buildAndInsert(Paragraph refNode)
Builds and inserts a field into the document to the end of the specified paragraph.
|
void |
buildBlock(DocumentBuilder documentBuilder) |
public FieldBuilder(int fieldType)
public FieldBuilder addArgument(java.lang.String argument)
argument - The argument value.public FieldBuilder addArgument(int argument)
argument - The argument value.public FieldBuilder addArgument(double argument)
argument - The argument value.public FieldBuilder addArgument(FieldBuilder argument)
FieldBuilder to the field's code.
This overload is used when the argument consists of a single child field.public FieldBuilder addArgument(FieldArgumentBuilder argument)
FieldArgumentBuilder to the field's code.
This overload is used when the argument consists of a mixture of different parts such as child fields, nodes, and plain text.public FieldBuilder addSwitch(java.lang.String switchName)
switchName - The switch name.public FieldBuilder addSwitch(java.lang.String switchName, java.lang.String switchArgument)
switchName - The switch name.switchArgument - The switch value.public FieldBuilder addSwitch(java.lang.String switchName, int switchArgument)
switchName - The switch name.switchArgument - The switch value.public FieldBuilder addSwitch(java.lang.String switchName, double switchArgument)
switchName - The switch name.switchArgument - The switch value.public Field buildAndInsert(Inline refNode) throws java.lang.Exception
Field object that represents the inserted field.java.lang.Exceptionpublic Field buildAndInsert(Paragraph refNode) throws java.lang.Exception
Field object that represents the inserted field.java.lang.Exceptionpublic void buildBlock(DocumentBuilder documentBuilder) throws java.lang.Exception
java.lang.Exception