Top Description Fields Constructors Methods
org.apache.tools.ant.util.facade

public Class FacadeTaskHelper

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, .Objects, java.util.stream.Stream, org.apache.tools.ant.Project, org.apache.tools.ant.types.Path

Helper class for facade implementations - encapsulates treatment of explicit implementation choices, magic properties and implementation specific command line arguments.
Since
Ant 1.5

Field Summary

Modifier and TypeField and Description
private List<ImplementationSpecificArgument>
args

Command line arguments.

private String
defaultValue

The default value.

private Path
implementationClasspath

User specified path used as classpath when loading the implementation.

private String
magicValue

The magic property to consult.

private String
userChoice

The explicitly chosen implementation.

Constructor Summary

AccessConstructor and Description
public
FacadeTaskHelper(String
The default value for the implementation. Must not be null.
defaultValue
)

public
FacadeTaskHelper(String
The default value for the implementation. Must not be null.
defaultValue
,
String
the value of a magic property that may hold a user. choice. May be null.
magicValue
)

Method Summary

Modifier and TypeMethod and Description
public void
addImplementationArgument(ImplementationSpecificArgument
an argument to add.
arg
)

Command line argument.

public String[]

Returns:

an array of command line arguments.
getArgs
()

Retrieves the command line arguments enabled for the current facade implementation.

public String

Returns:

the explicit user choice.
getExplicitChoice
()

Retrieves the explicit user choice.

public String

Returns:

the implementation.
getImplementation
()

Retrieves the implementation.

public Path

Returns:

a Path instance that may be appended to
getImplementationClasspath
(Project
the current project
project
)

The classpath to use when loading the implementation.

public boolean

Returns:

true if magic or user choice has be set.
hasBeenSet
()

Tests whether the implementation has been chosen by the user (either via a magic property or explicitly.

public void
setImplementation(String
the explicitly chosen implementation.
userChoice
)

Used for explicit user choices.

public void
setMagicValue(String
the value of a magic property that may hold a user.
magicValue
)

Used to set the value of the magic property.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

argsback to summary
private List<ImplementationSpecificArgument> args

Command line arguments.

defaultValueback to summary
private String defaultValue

The default value.

implementationClasspathback to summary
private Path implementationClasspath

User specified path used as classpath when loading the implementation.

magicValueback to summary
private String magicValue

The magic property to consult.

userChoiceback to summary
private String userChoice

The explicitly chosen implementation.

Constructor Detail

FacadeTaskHelperback to summary
public FacadeTaskHelper(String defaultValue)
Parameters
defaultValue:String

The default value for the implementation. Must not be null.

FacadeTaskHelperback to summary
public FacadeTaskHelper(String defaultValue, String magicValue)
Parameters
defaultValue:String

The default value for the implementation. Must not be null.

magicValue:String

the value of a magic property that may hold a user. choice. May be null.

Method Detail

addImplementationArgumentback to summary
public void addImplementationArgument(ImplementationSpecificArgument arg)

Command line argument.

Parameters
arg:ImplementationSpecificArgument

an argument to add.

getArgsback to summary
public String[] getArgs()

Retrieves the command line arguments enabled for the current facade implementation.

Returns:String[]

an array of command line arguments.

getExplicitChoiceback to summary
public String getExplicitChoice()

Retrieves the explicit user choice.

Returns:String

the explicit user choice.

getImplementationback to summary
public String getImplementation()

Retrieves the implementation.

Returns:String

the implementation.

getImplementationClasspathback to summary
public Path getImplementationClasspath(Project project)

The classpath to use when loading the implementation.

Parameters
project:Project

the current project

Returns:Path

a Path instance that may be appended to

Since
Ant 1.8.0
hasBeenSetback to summary
public boolean hasBeenSet()

Tests whether the implementation has been chosen by the user (either via a magic property or explicitly.

Returns:boolean

true if magic or user choice has be set.

Since
Ant 1.5.2
setImplementationback to summary
public void setImplementation(String userChoice)

Used for explicit user choices.

Parameters
userChoice:String

the explicitly chosen implementation.

setMagicValueback to summary
public void setMagicValue(String magicValue)

Used to set the value of the magic property.

Parameters
magicValue:String

the value of a magic property that may hold a user.