Package org.apache.tools.ant
Interface ArgumentProcessor
public interface ArgumentProcessor
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 TypeMethodDescriptionbooleanIf some arguments matched withreadArguments(String[], int), this method is called after all arguments were parsed.booleanHandle the arguments withreadArguments(String[], int), just after the project being configured.voidprepareConfigure(Project project, List<String> args) If some arguments matched withreadArguments(String[], int), this method is called just before the project being configuredvoidprintUsage(PrintStream writer) Print the usage of the supported argumentsintreadArguments(String[] args, int pos) Read the arguments from the command line at the specified position
-
Method Details
-
readArguments
Read the arguments from the command line at the specified positionIf the argument is not supported, returns -1. Else, the position of the first argument not supported.
- Parameters:
args- String[]pos- int- Returns:
- int
-
handleArg
If some arguments matched withreadArguments(String[], int), this method is called after all arguments were parsed. Returnstrueif Ant should stop there, ie the build file not parsed and the project should not be executed.- Parameters:
args- List<String>- Returns:
- boolean
-
prepareConfigure
If some arguments matched withreadArguments(String[], int), this method is called just before the project being configured- Parameters:
project- Projectargs- List<String>
-
handleArg
Handle the arguments withreadArguments(String[], int), just after the project being configured. Returnstrueif Ant should stop there, ie the build file not parsed and the project should not be executed.- Parameters:
project- Projectarg- List<String>- Returns:
- boolean
-
printUsage
Print the usage of the supported arguments- Parameters:
writer- PrintStream- See Also:
-