if and unless attributes make the
failure conditional -both probe for the named property being defined.
The if tests for the property being defined, the
unless for a property being undefined.
If both attributes are set, then the test fails only if both tests
are true. i.e.
fail := defined(ifProperty) && !defined(unlessProperty)A single nested
<condition> element can be specified
instead of using if/unless (a combined
effect can be achieved using isset conditions).
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private Object | |
| private String | |
| private Exit. | |
| private Integer | |
| private Object |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public ConditionBase | |
| public void | execute()
Overrides org. BuildException to exit (fail) the build.
|
| private boolean | |
| private boolean | |
| public void | |
| public void | |
| public void | setMessage(String
message to output value)A message giving further information on why the build exited. |
| public void | |
| public void | |
| public void | |
| private boolean | Returns: true if there is no if condition, or the named property existstest the if condition |
| private boolean | Returns: true if there is none, or it evaluates to truetest the nested condition |
| private boolean | Returns: true if there is no unless condition, or there is a named property but it doesn't existtest the unless condition |
| ifCondition | back to summary |
|---|---|
| private Object ifCondition | |
| message | back to summary |
|---|---|
| private String message | |
| nestedCondition | back to summary |
|---|---|
| private Exit. | |
| status | back to summary |
|---|---|
| private Integer status | |
| unlessCondition | back to summary |
|---|---|
| private Object unlessCondition | |
| Exit | back to summary |
|---|---|
| public Exit() | |
| addText | back to summary |
|---|---|
| public void addText(String msg) Set a multiline message.
| |
| createCondition | back to summary |
|---|---|
| public ConditionBase createCondition() Add a condition element.
| |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Overrides org. Throw a
| |
| isNullOrEmpty | back to summary |
|---|---|
| private boolean isNullOrEmpty(Object value) | |
| nestedConditionPresent | back to summary |
|---|---|
| private boolean nestedConditionPresent() test whether there is a nested condition.
| |
| setIf | back to summary |
|---|---|
| public void setIf(Object c) Only fail if the given expression evaluates to true or the name of an existing property.
| |
| setIf | back to summary |
|---|---|
| public void setIf(String c) Only fail if the given expression evaluates to true or the name of an existing property.
| |
| setMessage | back to summary |
|---|---|
| public void setMessage(String value) A message giving further information on why the build exited.
| |
| setStatus | back to summary |
|---|---|
| public void setStatus(int i) Set the status code to associate with the thrown Exception.
| |
| setUnless | back to summary |
|---|---|
| public void setUnless(Object c) Only fail if the given expression evaluates to false or tno property of the given name exists.
| |
| setUnless | back to summary |
|---|---|
| public void setUnless(String c) Only fail if the given expression evaluates to false or tno property of the given name exists.
| |
| testIfCondition | back to summary |
|---|---|
| private boolean testIfCondition() test the if condition
| |
| testNestedCondition | back to summary |
|---|---|
| private boolean testNestedCondition() test the nested condition
| |
| testUnlessCondition | back to summary |
|---|---|
| private boolean testUnlessCondition() test the unless condition
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean |
| NestedCondition | back to summary |
|---|---|
| private NestedCondition() | |
| eval | back to summary |
|---|---|
| public boolean eval() Implements org. Doc from org. Is this condition true?
| |