Top Description Methods
org.apache.tools.ant

public Interface ArgumentProcessor

Imports
java.io.PrintStream, java.util.List

Processor of arguments of the command line.

Arguments supported by third party code should not conflict with Ant core ones. It is then recommended to chose specific 'enough' argument name, avoiding for instance one letter arguments. By the way, if there any conflict, Ant will take precedence.

Since
1.9

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

boolean
handleArg
(List<String>
List<String>
args
)

If some arguments matched with readArguments(String[], int), this method is called after all arguments were parsed.

public boolean

Returns:

boolean
handleArg
(Project
Project
project
,
List<String>
List<String>
arg
)

Handle the arguments with readArguments(String[], int), just after the project being configured.

public void
prepareConfigure(Project
Project
project
,
List<String>
List<String>
args
)

If some arguments matched with readArguments(String[], int), this method is called just before the project being configured

public void
printUsage(PrintStream
PrintStream
writer
)

Print the usage of the supported arguments

public int

Returns:

int
readArguments
(String[]
String[]
args
,
int
int
pos
)

Read the arguments from the command line at the specified position

If the argument is not supported, returns -1.

Method Detail

handleArgback to summary
public boolean handleArg(List<String> args)

If some arguments matched with readArguments(String[], int), this method is called after all arguments were parsed. Returns true if Ant should stop there, ie the build file not parsed and the project should not be executed.

Parameters
args:List<String>

List<String>

Returns:boolean

boolean

handleArgback to summary
public boolean handleArg(Project project, List<String> arg)

Handle the arguments with readArguments(String[], int), just after the project being configured. Returns true if Ant should stop there, ie the build file not parsed and the project should not be executed.

Parameters
project:Project

Project

arg:List<String>

List<String>

Returns:boolean

boolean

prepareConfigureback to summary
public void prepareConfigure(Project project, List<String> args)

If some arguments matched with readArguments(String[], int), this method is called just before the project being configured

Parameters
project:Project

Project

args:List<String>

List<String>

printUsageback to summary
public void printUsage(PrintStream writer)

Print the usage of the supported arguments

Parameters
writer:PrintStream

PrintStream

See Also
org.apache.tools.ant.Main#printUsage()
readArgumentsback to summary
public int readArguments(String[] args, int pos)

Read the arguments from the command line at the specified position

If the argument is not supported, returns -1. Else, the position of the first argument not supported.

Parameters
args:String[]

String[]

pos:int

int

Returns:int

int