Path classpath = getClasspath() != null ? getClasspath() : new Path(getProject());
// extract joint options, some get pushed up...
List<String> jointOptions = new ArrayList<String>();
if (jointCompilation) {
RuntimeConfigurable rc = javac.getRuntimeConfigurableWrapper();
for (Iterator i = rc.getAttributeMap().entrySet().iterator(); i.hasNext();) {
final Map.Entry e = (Map.Entry) i.next();
final String key = e.getKey().toString();
final String value = getProject().replaceProperties(e.getValue().toString());
if (key.contains("debug")) {
String level = "";
if (javac.getDebugLevel() != null) {
level = ":" + javac.getDebugLevel();
}
jointOptions.add("-Fg" + level);
} else if (key.contains("debugLevel")) {
// ignore, taken care of in debug
} else if ((key.contains("nowarn"))
|| (key.contains("verbose"))
|| (key.contains("deprecation"))) {
// false is default, so something to do only in true case
if ("on".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value) || "yes".equalsIgnoreCase("value"))
jointOptions.add("-F" + key);
} else if (key.contains("classpath")) {
classpath.add(javac.getClasspath());
} else if ((key.contains("depend"))
|| (key.contains("extdirs"))
|| (key.contains("encoding"))
|| (key.contains("source"))
|| (key.contains("target"))
|| (key.contains("verbose"))) { // TODO remove extra verbose?
jointOptions.add("-J" + key + "=" + value);
} else {
log("The option " + key + " cannot be set on the contained <javac> element. The option will be ignored", Project.MSG_WARN);
}
// includes? excludes?
}
// ant's <javac> supports nested <compilerarg value=""> elements (there can be multiple of them)
// for additional options to be passed to javac.
Enumeration children = rc.getChildren();
while (children.hasMoreElements()) {
RuntimeConfigurable childrc = (RuntimeConfigurable) children.nextElement();
if(childrc.getElementTag().equals("compilerarg")) {
for (Iterator i = childrc.getAttributeMap().entrySet().iterator(); i.hasNext();) {
final Map.Entry e = (Map.Entry) i.next();
final String key = e.getKey().toString();
if(key.equals("value")) {
final String value = getProject().replaceProperties(e.getValue().toString());
StringTokenizer st = new StringTokenizer(value, " ");