xapi.args.ArgHandlerDir Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xapi-gwt Show documentation
Show all versions of xapi-gwt Show documentation
This module exists solely to package all other gwt modules into a single
uber jar. This makes deploying to non-mavenized targets much easier.
Of course, you would be wise to inherit your dependencies individually;
the uber jar is intended for projects like collide,
which have complex configuration, and adding many jars would be a pain.
The newest version!
package xapi.args;
import java.io.File;
/**
* Argument handler for arguments that are directories.
*
* Based on original implementation from the GWT project.
*
* @author GWT team "gwtproject.org"
* @author James X. Nelson "[email protected]"
*
*/
public abstract class ArgHandlerDir extends ArgHandler {
@Override
public String[] getTagArgs() {
return new String[]{"dir"};
}
@Override
public int handle(String[] args, int startIndex) {
if (startIndex + 1 < args.length) {
setDir(new File(args[startIndex + 1]));
return 1;
}
System.err.println(getTag()
+ " should be followed by the name of a directory");
return -1;
}
public abstract void setDir(File dir);
}