public class DXLVariable extends Object implements DXLFragment
DXLBufferFragment
.
The DXLVariable.FileOutput
enables to declare a file variable in which the DXL execution is supposed to write content, content which
must then be retrieve in the Java code.
DXLEngine
,
DXLBufferFragment
,
DXLVariable.FileOutput
Modifier and Type | Class and Description |
---|---|
static class |
DXLVariable.FileOutput
Enables to declare a file variable in which the DXL execution is supposed to write content,
content which must then be retrieved in the Java code.
|
Modifier and Type | Method and Description |
---|---|
static DXLFragment |
create(String name,
boolean value)
Instantiates a fragment that declares a boolean variable.
|
static DXLFragment |
create(String name,
File value)
Instantiates a fragment that declares a string variable whose value is a file path.
|
static DXLFragment |
create(String name,
int value)
Instantiates a fragment that declares an int variable.
|
static DXLFragment |
create(String name,
String value)
Instantiates a fragment that declares a String variable.
|
static DXLFragment |
createUnquoted(String name,
String value)
Instantiates a fragment that declares a String variable whose value is already surrounded by quotes.
|
void |
write(Writer writer)
Writes the content of this fragment into the specified writer.
|
public static DXLFragment create(String name, boolean value)
name
- the DXL variable name.value
- the DXL variable value.public static DXLFragment create(String name, int value)
name
- the DXL variable name.value
- the DXL variable value.public static DXLFragment create(String name, String value)
name
- the DXL variable name.value
- the DXL variable value.public static DXLFragment createUnquoted(String name, String value)
name
- the DXL variable name.value
- the DXL variable value.public static DXLFragment create(String name, File value)
name
- the DXL variable name.value
- a file pathpublic void write(Writer writer) throws IOException
DXLFragment
DXLEngine
when combining
fragments into a DXL file.write
in interface DXLFragment
writer
- the writer in which to output the content of the fragment.IOException
- if the content cannot be written.