Fields Summary |
---|
private boolean | compile |
private String | factory |
private org.apache.tools.ant.types.Path | factoryPath |
private Vector | options |
private File | preprocessDir |
public static final String | EXECUTABLE_NAMEThe name of the apt tool. |
public static final String | ERROR_IGNORING_COMPILER_OPTIONAn warning message when ignoring compiler attribute. |
public static final String | ERROR_WRONG_JAVA_VERSIONA warning message if used with java < 1.5. |
public static final String | WARNING_IGNORING_FORKexposed for debug messages |
Methods Summary |
---|
public org.apache.tools.ant.types.Path | createFactoryPath()Add a path to the factoryPath attribute.
if (factoryPath == null) {
factoryPath = new Path(getProject());
}
return factoryPath.createPath();
|
public org.apache.tools.ant.taskdefs.Apt$Option | createOption()Create a nested option.
Option opt = new Option();
options.add(opt);
return opt;
|
public void | execute()Do the compilation.
super.execute();
|
public java.lang.String | getAptExecutable()Get the name of the apt executable.
return JavaEnvUtils.getJdkExecutable(EXECUTABLE_NAME);
|
public java.lang.String | getCompiler()Get the compiler class name.
return super.getCompiler();
|
public java.lang.String | getFactory()Get the factory option for the apt compiler.
If this is non-null the "-factory" argument will be used.
return factory;
|
public org.apache.tools.ant.types.Path | getFactoryPath()Get the factory path attribute.
If this is not null, the "-factorypath" argument will be used.
The default value is null.
return factoryPath;
|
public java.util.Vector | getOptions()Get the options to the compiler.
Each option will use '"-E" name ["=" value]' argument.
return options;
|
public java.io.File | getPreprocessDir()Get the preprocessdir attribute.
This corresponds to the "-s" argument.
The default value is null.
return preprocessDir;
|
public boolean | isCompile()Get the compile option for the apt compiler.
If this is false the "-nocompile" argument will be used.
return compile;
|
public void | setCompile(boolean compile)Set the compile option for the apt compiler.
Default value is true.
this.compile = compile;
|
public void | setCompiler(java.lang.String compiler)Set the compiler.
This is not allowed and a warning log message is made.
log(ERROR_IGNORING_COMPILER_OPTION, Project.MSG_WARN);
|
public void | setFactory(java.lang.String factory)Set the factory option for the apt compiler.
Default value is null.
this.factory = factory;
|
public void | setFactoryPathRef(org.apache.tools.ant.types.Reference ref)Add a reference to a path to the factoryPath attribute.
createFactoryPath().setRefid(ref);
|
public void | setFork(boolean fork)Set the fork attribute.
Non-forking APT is highly classpath dependent and appears to be too
brittle to work. The sole reason this attribute is retained
is the superclass does it
if (!fork) {
log(WARNING_IGNORING_FORK, Project.MSG_WARN);
}
|
public void | setPreprocessDir(java.io.File preprocessDir)Set the preprocessdir attribute.
this.preprocessDir = preprocessDir;
|