buffer.append(line).append(" "); //$NON-NLS-1$
}
}
newArgs = tokenize(buffer.toString());
} catch(IOException e) {
throw new InvalidInputException(
this.bind("configure.invalidexpansionargumentname", arg)); //$NON-NLS-1$
}
}
if (newArgs != null) {
int newCommandLineArgsLength = newCommandLineArgs.length;
int newArgsLength = newArgs.length;
System.arraycopy(newCommandLineArgs, 0, (newCommandLineArgs = new String[newCommandLineArgsLength + newArgsLength - 1]), 0, index);
System.arraycopy(newArgs, 0, newCommandLineArgs, index, newArgsLength);
index += newArgsLength;
} else {
newCommandLineArgs[index++] = arg;
}
}
index = -1;
} else {
newCommandLineArgs = argv;
for (int i = 0; i < argCount; i++) {
newCommandLineArgs[i] = newCommandLineArgs[i].trim();
}
}
argCount = newCommandLineArgs.length;
this.expandedCommandLine = newCommandLineArgs;
while (++index < argCount) {
if (customEncoding != null) {
throw new InvalidInputException(
this.bind("configure.unexpectedCustomEncoding", currentArg, customEncoding)); //$NON-NLS-1$
}
currentArg = newCommandLineArgs[index];
switch(mode) {
case DEFAULT :
if (currentArg.startsWith("[")) { //$NON-NLS-1$
throw new InvalidInputException(
this.bind("configure.unexpectedBracket", //$NON-NLS-1$
currentArg));
}
if (currentArg.endsWith("]")) { //$NON-NLS-1$
// look for encoding specification
int encodingStart = currentArg.indexOf('[') + 1;
if (encodingStart <= 1) {
throw new InvalidInputException(
this.bind("configure.unexpectedBracket", currentArg)); //$NON-NLS-1$
}
int encodingEnd = currentArg.length() - 1;
if (encodingStart >= 1) {
if (encodingStart < encodingEnd) {
customEncoding = currentArg.substring(encodingStart, encodingEnd);
try { // ensure encoding is supported
new InputStreamReader(new ByteArrayInputStream(new byte[0]), customEncoding);
} catch (UnsupportedEncodingException e) {
throw new InvalidInputException(
this.bind("configure.unsupportedEncoding", customEncoding)); //$NON-NLS-1$
}
}
currentArg = currentArg.substring(0, encodingStart - 1);
}
}
if (currentArg.endsWith(SuffixConstants.SUFFIX_STRING_java)) {
if (this.filenames == null) {
this.filenames = new String[argCount - index];
this.encodings = new String[argCount - index];
this.destinationPaths = new String[argCount - index];
} else if (filesCount == this.filenames.length) {
int length = this.filenames.length;
System.arraycopy(
this.filenames,
0,
(this.filenames = new String[length + argCount - index]),
0,
length);
System.arraycopy(
this.encodings,
0,
(this.encodings = new String[length + argCount - index]),
0,
length);
System.arraycopy(
this.destinationPaths,
0,
(this.destinationPaths = new String[length + argCount - index]),
0,
length);
}
this.filenames[filesCount] = currentArg;
this.encodings[filesCount++] = customEncoding;
// destination path cannot be specified upon an individual file
customEncoding = null;
mode = DEFAULT;
continue;
}
if (currentArg.equals("-log")) { //$NON-NLS-1$
if (this.log != null)
throw new InvalidInputException(
this.bind("configure.duplicateLog", currentArg)); //$NON-NLS-1$
mode = INSIDE_LOG;
continue;
}
if (currentArg.equals("-repeat")) { //$NON-NLS-1$
if (this.repetitions > 0)
throw new InvalidInputException(
this.bind("configure.duplicateRepeat", currentArg)); //$NON-NLS-1$
mode = INSIDE_REPETITION;
continue;
}
if (currentArg.equals("-maxProblems")) { //$NON-NLS-1$
if (this.maxProblems > 0)
throw new InvalidInputException(
this.bind("configure.duplicateMaxProblems", currentArg)); //$NON-NLS-1$
mode = INSIDE_MAX_PROBLEMS;
continue;
}
if (currentArg.equals("-source")) { //$NON-NLS-1$
mode = INSIDE_SOURCE;
continue;
}
if (currentArg.equals("-encoding")) { //$NON-NLS-1$
mode = INSIDE_DEFAULT_ENCODING;
continue;
}
if (currentArg.equals("-1.3")) { //$NON-NLS-1$
if (didSpecifyCompliance) {
throw new InvalidInputException(
this.bind("configure.duplicateCompliance", currentArg));//$NON-NLS-1$
}
didSpecifyCompliance = true;
this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_3);
mode = DEFAULT;
continue;
}
if (currentArg.equals("-1.4")) { //$NON-NLS-1$
if (didSpecifyCompliance) {
throw new InvalidInputException(
this.bind("configure.duplicateCompliance", currentArg)); //$NON-NLS-1$
}
didSpecifyCompliance = true;
this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_4);
mode = DEFAULT;
continue;
}
if (currentArg.equals("-1.5") || currentArg.equals("-5") || currentArg.equals("-5.0")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (didSpecifyCompliance) {
throw new InvalidInputException(
this.bind("configure.duplicateCompliance", currentArg)); //$NON-NLS-1$
}
didSpecifyCompliance = true;
this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5);
mode = DEFAULT;
continue;
}
if (currentArg.equals("-1.6") || currentArg.equals("-6") || currentArg.equals("-6.0")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (didSpecifyCompliance) {
throw new InvalidInputException(
this.bind("configure.duplicateCompliance", currentArg)); //$NON-NLS-1$
}
didSpecifyCompliance = true;
this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6);
mode = DEFAULT;
continue;
}
if (currentArg.equals("-1.7") || currentArg.equals("-7") || currentArg.equals("-7.0")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (didSpecifyCompliance) {
throw new InvalidInputException(
this.bind("configure.duplicateCompliance", currentArg)); //$NON-NLS-1$
}
didSpecifyCompliance = true;
this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_7);
mode = DEFAULT;
continue;
}
if (currentArg.equals("-d")) { //$NON-NLS-1$
if (this.destinationPath != null) {
StringBuffer errorMessage = new StringBuffer();
errorMessage.append(currentArg);
if ((index + 1) < argCount) {
errorMessage.append(' ');
errorMessage.append(newCommandLineArgs[index + 1]);
}
throw new InvalidInputException(
this.bind("configure.duplicateOutputPath", errorMessage.toString())); //$NON-NLS-1$
}
mode = INSIDE_DESTINATION_PATH;
continue;
}
if (currentArg.equals("-classpath") //$NON-NLS-1$
|| currentArg.equals("-cp")) { //$NON-NLS-1$
mode = INSIDE_CLASSPATH_start;
continue;
}
if (currentArg.equals("-bootclasspath")) {//$NON-NLS-1$
if (bootclasspaths.size() > 0) {
StringBuffer errorMessage = new StringBuffer();
errorMessage.append(currentArg);
if ((index + 1) < argCount) {
errorMessage.append(' ');
errorMessage.append(newCommandLineArgs[index + 1]);
}
throw new InvalidInputException(
this.bind("configure.duplicateBootClasspath", errorMessage.toString())); //$NON-NLS-1$
}
mode = INSIDE_BOOTCLASSPATH_start;
continue;
}
if (currentArg.equals("-sourcepath")) {//$NON-NLS-1$
if (sourcepathClasspathArg != null) {
StringBuffer errorMessage = new StringBuffer();
errorMessage.append(currentArg);
if ((index + 1) < argCount) {
errorMessage.append(' ');
errorMessage.append(newCommandLineArgs[index + 1]);
}
throw new InvalidInputException(
this.bind("configure.duplicateSourcepath", errorMessage.toString())); //$NON-NLS-1$
}
mode = INSIDE_SOURCE_PATH_start;
continue;
}
if (currentArg.equals("-extdirs")) {//$NON-NLS-1$
if (extdirsClasspaths != null) {
StringBuffer errorMessage = new StringBuffer();
errorMessage.append(currentArg);
if ((index + 1) < argCount) {
errorMessage.append(' ');
errorMessage.append(newCommandLineArgs[index + 1]);
}
throw new InvalidInputException(
this.bind("configure.duplicateExtDirs", errorMessage.toString())); //$NON-NLS-1$
}
mode = INSIDE_EXT_DIRS;
continue;
}
if (currentArg.equals("-endorseddirs")) { //$NON-NLS-1$
if (endorsedDirClasspaths != null) {
StringBuffer errorMessage = new StringBuffer();
errorMessage.append(currentArg);
if ((index + 1) < argCount) {
errorMessage.append(' ');
errorMessage.append(newCommandLineArgs[index + 1]);
}
throw new InvalidInputException(
this.bind("configure.duplicateEndorsedDirs", errorMessage.toString())); //$NON-NLS-1$
}
mode = INSIDE_ENDORSED_DIRS;
continue;
}
if (currentArg.equals("-progress")) { //$NON-NLS-1$
mode = DEFAULT;
this.showProgress = true;
continue;
}
if (currentArg.equals("-proceedOnError")) { //$NON-NLS-1$
mode = DEFAULT;
this.proceedOnError = true;
continue;
}
if (currentArg.equals("-time")) { //$NON-NLS-1$
mode = DEFAULT;
this.timing = true;
continue;
}
if (currentArg.equals("-version") //$NON-NLS-1$
|| currentArg.equals("-v")) { //$NON-NLS-1$
this.logger.logVersion(true);
this.proceed = false;
return;
}
if (currentArg.equals("-showversion")) { //$NON-NLS-1$
printVersionRequired = true;
mode = DEFAULT;
continue;
}
if ("-deprecation".equals(currentArg)) { //$NON-NLS-1$
didSpecifyDeprecation = true;
this.options.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.WARNING);
mode = DEFAULT;
continue;
}
if (currentArg.equals("-help") || currentArg.equals("-?")) { //$NON-NLS-1$ //$NON-NLS-2$
printUsageRequired = true;
mode = DEFAULT;
continue;
}
if (currentArg.equals("-help:warn") || //$NON-NLS-1$
currentArg.equals("-?:warn")) { //$NON-NLS-1$
printUsageRequired = true;
usageSection = "misc.usage.warn"; //$NON-NLS-1$
continue;
}
if (currentArg.equals("-noExit")) { //$NON-NLS-1$
this.systemExitWhenFinished = false;
mode = DEFAULT;
continue;
}
if (currentArg.equals("-verbose")) { //$NON-NLS-1$
this.verbose = true;
mode = DEFAULT;
continue;
}
if (currentArg.equals("-referenceInfo")) { //$NON-NLS-1$
this.produceRefInfo = true;
mode = DEFAULT;
continue;
}
if (currentArg.equals("-inlineJSR")) { //$NON-NLS-1$
mode = DEFAULT;
this.options.put(
CompilerOptions.OPTION_InlineJsr,
CompilerOptions.ENABLED);
continue;
}
if (currentArg.startsWith("-g")) { //$NON-NLS-1$
mode = DEFAULT;
String debugOption = currentArg;
int length = currentArg.length();
if (length == 2) {
this.options.put(
CompilerOptions.OPTION_LocalVariableAttribute,
CompilerOptions.GENERATE);
this.options.put(
CompilerOptions.OPTION_LineNumberAttribute,
CompilerOptions.GENERATE);
this.options.put(
CompilerOptions.OPTION_SourceFileAttribute,
CompilerOptions.GENERATE);
continue;
}
if (length > 3) {
this.options.put(
CompilerOptions.OPTION_LocalVariableAttribute,
CompilerOptions.DO_NOT_GENERATE);
this.options.put(
CompilerOptions.OPTION_LineNumberAttribute,
CompilerOptions.DO_NOT_GENERATE);
this.options.put(
CompilerOptions.OPTION_SourceFileAttribute,
CompilerOptions.DO_NOT_GENERATE);
if (length == 7 && debugOption.equals("-g:" + NONE)) //$NON-NLS-1$
continue;
StringTokenizer tokenizer =
new StringTokenizer(debugOption.substring(3, debugOption.length()), ","); //$NON-NLS-1$
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
if (token.equals("vars")) { //$NON-NLS-1$
this.options.put(
CompilerOptions.OPTION_LocalVariableAttribute,
CompilerOptions.GENERATE);
} else if (token.equals("lines")) { //$NON-NLS-1$
this.options.put(
CompilerOptions.OPTION_LineNumberAttribute,
CompilerOptions.GENERATE);
} else if (token.equals("source")) { //$NON-NLS-1$
this.options.put(
CompilerOptions.OPTION_SourceFileAttribute,
CompilerOptions.GENERATE);
} else {
throw new InvalidInputException(
this.bind("configure.invalidDebugOption", debugOption)); //$NON-NLS-1$
}
}
continue;
}
throw new InvalidInputException(
this.bind("configure.invalidDebugOption", debugOption)); //$NON-NLS-1$
}
if (currentArg.startsWith("-nowarn")) { //$NON-NLS-1$
disableWarnings();
mode = DEFAULT;
continue;
}
if (currentArg.startsWith("-warn")) { //$NON-NLS-1$
mode = DEFAULT;
String warningOption = currentArg;
int length = currentArg.length();
if (length == 10 && warningOption.equals("-warn:" + NONE)) { //$NON-NLS-1$
disableWarnings();
continue;
}
if (length <= 6) {
throw new InvalidInputException(
this.bind("configure.invalidWarningConfiguration", warningOption)); //$NON-NLS-1$
}
int warnTokenStart;
boolean isEnabling;
switch (warningOption.charAt(6)) {
case '+' :
warnTokenStart = 7;
isEnabling = true;
break;
case '-' :
warnTokenStart = 7;
isEnabling = false; // mentionned warnings are disabled
break;
default:
warnTokenStart = 6;
// clear default warning level
// but allow multiple warning option on the command line
if (!didSpecifyWarnings) disableWarnings();
isEnabling = true;
}
StringTokenizer tokenizer =
new StringTokenizer(warningOption.substring(warnTokenStart, warningOption.length()), ","); //$NON-NLS-1$
int tokenCounter = 0;
if (didSpecifyDeprecation) { // deprecation could have also been set through -deprecation option
this.options.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.WARNING);
}
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
tokenCounter++;
handleWarningToken(token, isEnabling, useEnableJavadoc);
}
if (tokenCounter == 0)
throw new InvalidInputException(
this.bind("configure.invalidWarningOption", currentArg)); //$NON-NLS-1$
didSpecifyWarnings = true;
continue;
}
if (currentArg.equals("-target")) { //$NON-NLS-1$
mode = INSIDE_TARGET;
continue;
}
if (currentArg.equals("-preserveAllLocals")) { //$NON-NLS-1$
this.options.put(
CompilerOptions.OPTION_PreserveUnusedLocal,
CompilerOptions.PRESERVE);
mode = DEFAULT;
continue;
}
if (currentArg.equals("-enableJavadoc")) {//$NON-NLS-1$
mode = DEFAULT;
this.options.put(
CompilerOptions.OPTION_DocCommentSupport,
CompilerOptions.ENABLED);
useEnableJavadoc = true;
continue;
}
if (currentArg.equals("-Xemacs")) { //$NON-NLS-1$
mode = DEFAULT;
this.logger.setEmacs();
continue;
}
// annotation processing
if (currentArg.startsWith("-A")) { //$NON-NLS-1$
mode = DEFAULT;
continue;
}
if (currentArg.equals("-processorpath")) { //$NON-NLS-1$
mode = INSIDE_PROCESSOR_PATH_start;
continue;
}
if (currentArg.equals("-processor")) { //$NON-NLS-1$
mode = INSIDE_PROCESSOR_start;
continue;
}
if (currentArg.equals("-proc:only")) { //$NON-NLS-1$
this.options.put(
CompilerOptions.OPTION_GenerateClassFiles,
CompilerOptions.DISABLED);
mode = DEFAULT;
continue;
}
if (currentArg.equals("-proc:none")) { //$NON-NLS-1$
didSpecifyDisabledAnnotationProcessing = true;
this.options.put(
CompilerOptions.OPTION_Process_Annotations,
CompilerOptions.DISABLED);
mode = DEFAULT;
continue;
}
if (currentArg.equals("-s")) { //$NON-NLS-1$
mode = INSIDE_S_start;
continue;
}
if (currentArg.equals("-XprintProcessorInfo") //$NON-NLS-1$
|| currentArg.equals("-XprintRounds")) { //$NON-NLS-1$
mode = DEFAULT;
continue;
}
// tolerated javac options - quietly filtered out
if (currentArg.startsWith("-X")) { //$NON-NLS-1$
mode = DEFAULT;
continue;
}
if (currentArg.startsWith("-J")) { //$NON-NLS-1$
mode = DEFAULT;
continue;
}
if (currentArg.equals("-O")) { //$NON-NLS-1$
mode = DEFAULT;
continue;
}
if (currentArg.equals("-classNames")) { //$NON-NLS-1$
mode = INSIDE_CLASS_NAMES;
continue;
}
break;
case INSIDE_TARGET :
if (this.didSpecifyTarget) {
throw new InvalidInputException(
this.bind("configure.duplicateTarget", currentArg));//$NON-NLS-1$
}
this.didSpecifyTarget = true;
if (currentArg.equals("1.1")) { //$NON-NLS-1$
this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_1);
} else if (currentArg.equals("1.2")) { //$NON-NLS-1$
this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_2);
} else if (currentArg.equals("1.3")) { //$NON-NLS-1$
this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_3);
} else if (currentArg.equals("1.4")) { //$NON-NLS-1$
this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_4);
} else if (currentArg.equals("1.5") || currentArg.equals("5") || currentArg.equals("5.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
} else if (currentArg.equals("1.6") || currentArg.equals("6") || currentArg.equals("6.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
} else if (currentArg.equals("1.7") || currentArg.equals("7") || currentArg.equals("7.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
} else if (currentArg.equals("jsr14")) { //$NON-NLS-1$
this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_JSR14);
} else {
throw new InvalidInputException(this.bind("configure.targetJDK", currentArg)); //$NON-NLS-1$
}
mode = DEFAULT;
continue;
case INSIDE_LOG :
this.log = currentArg;
mode = DEFAULT;
continue;
case INSIDE_REPETITION :
try {
this.repetitions = Integer.parseInt(currentArg);
if (this.repetitions <= 0) {
throw new InvalidInputException(this.bind("configure.repetition", currentArg)); //$NON-NLS-1$
}
} catch (NumberFormatException e) {
throw new InvalidInputException(this.bind("configure.repetition", currentArg)); //$NON-NLS-1$
}
mode = DEFAULT;
continue;
case INSIDE_MAX_PROBLEMS :
try {
this.maxProblems = Integer.parseInt(currentArg);
if (this.maxProblems <= 0) {
throw new InvalidInputException(this.bind("configure.maxProblems", currentArg)); //$NON-NLS-1$
}
this.options.put(CompilerOptions.OPTION_MaxProblemPerUnit, currentArg);
} catch (NumberFormatException e) {
throw new InvalidInputException(this.bind("configure.maxProblems", currentArg)); //$NON-NLS-1$
}
mode = DEFAULT;
continue;
case INSIDE_SOURCE :
if (this.didSpecifySource) {
throw new InvalidInputException(
this.bind("configure.duplicateSource", currentArg));//$NON-NLS-1$
}
this.didSpecifySource = true;
if (currentArg.equals("1.3")) { //$NON-NLS-1$
this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_3);
} else if (currentArg.equals("1.4")) { //$NON-NLS-1$
this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_4);
} else if (currentArg.equals("1.5") || currentArg.equals("5") || currentArg.equals("5.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
} else if (currentArg.equals("1.6") || currentArg.equals("6") || currentArg.equals("6.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6);
} else if (currentArg.equals("1.7") || currentArg.equals("7") || currentArg.equals("7.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7);
} else {
throw new InvalidInputException(this.bind("configure.source", currentArg)); //$NON-NLS-1$
}
mode = DEFAULT;
continue;
case INSIDE_DEFAULT_ENCODING :
if (didSpecifyDefaultEncoding) {
throw new InvalidInputException(
this.bind("configure.duplicateDefaultEncoding", currentArg)); //$NON-NLS-1$
}
try { // ensure encoding is supported
new InputStreamReader(new ByteArrayInputStream(new byte[0]), currentArg);
} catch (UnsupportedEncodingException e) {
throw new InvalidInputException(
this.bind("configure.unsupportedEncoding", currentArg)); //$NON-NLS-1$
}
this.options.put(CompilerOptions.OPTION_Encoding, currentArg);
didSpecifyDefaultEncoding = true;
mode = DEFAULT;
continue;
case INSIDE_DESTINATION_PATH :
this.setDestinationPath(currentArg.equals(NONE) ? NONE : currentArg);
mode = DEFAULT;
continue;
case INSIDE_CLASSPATH_start:
mode = DEFAULT;
index += processPaths(newCommandLineArgs, index, currentArg, classpaths);
continue;
case INSIDE_BOOTCLASSPATH_start:
mode = DEFAULT;
index += processPaths(newCommandLineArgs, index, currentArg, bootclasspaths);
continue;
case INSIDE_SOURCE_PATH_start:
mode = DEFAULT;
String[] sourcePaths = new String[1];
index += processPaths(newCommandLineArgs, index, currentArg, sourcePaths);
sourcepathClasspathArg = sourcePaths[0];
continue;
case INSIDE_EXT_DIRS:
if (currentArg.indexOf("[-d") != -1) { //$NON-NLS-1$
throw new InvalidInputException(
this.bind("configure.unexpectedDestinationPathEntry", //$NON-NLS-1$
"-extdir")); //$NON-NLS-1$
}
StringTokenizer tokenizer = new StringTokenizer(currentArg, File.pathSeparator, false);
extdirsClasspaths = new ArrayList(DEFAULT_SIZE_CLASSPATH);
while (tokenizer.hasMoreTokens())
extdirsClasspaths.add(tokenizer.nextToken());
mode = DEFAULT;
continue;
case INSIDE_ENDORSED_DIRS:
if (currentArg.indexOf("[-d") != -1) { //$NON-NLS-1$
throw new InvalidInputException(
this.bind("configure.unexpectedDestinationPathEntry", //$NON-NLS-1$
"-endorseddirs")); //$NON-NLS-1$
} tokenizer = new StringTokenizer(currentArg, File.pathSeparator, false);
endorsedDirClasspaths = new ArrayList(DEFAULT_SIZE_CLASSPATH);
while (tokenizer.hasMoreTokens())
endorsedDirClasspaths.add(tokenizer.nextToken());
mode = DEFAULT;
continue;
case INSIDE_SOURCE_DIRECTORY_DESTINATION_PATH:
if (currentArg.endsWith("]")) { //$NON-NLS-1$
customDestinationPath = currentArg.substring(0,
currentArg.length() - 1);
} else {
throw new InvalidInputException(
this.bind("configure.incorrectDestinationPathEntry", //$NON-NLS-1$
"[-d " + currentArg)); //$NON-NLS-1$
}
break;
case INSIDE_PROCESSOR_PATH_start :
// nothing to do here. This is consumed again by the AnnotationProcessorManager
mode = DEFAULT;
continue;
case INSIDE_PROCESSOR_start :
// nothing to do here. This is consumed again by the AnnotationProcessorManager
mode = DEFAULT;
continue;
case INSIDE_S_start :
// nothing to do here. This is consumed again by the AnnotationProcessorManager
mode = DEFAULT;
continue;
case INSIDE_CLASS_NAMES :
tokenizer = new StringTokenizer(currentArg, ","); //$NON-NLS-1$
if (this.classNames == null) {
this.classNames = new String[DEFAULT_SIZE_CLASSPATH];
}
while (tokenizer.hasMoreTokens()) {
if (this.classNames.length == classCount) {
// resize
System.arraycopy(
this.classNames,
0,
(this.classNames = new String[classCount * 2]),
0,
classCount);
}
this.classNames[classCount++] = tokenizer.nextToken();
}
mode = DEFAULT;
continue;
}
// default is input directory, if no custom destination path exists
// AspectJ Extension
// see pr 60863. All directories should have been dealt with at the AspectJ layer - if we have left
// anything to be processed here it is an error.
throw new InvalidInputException(
"unrecognized single argument: \""+currentArg+"\"");
/*
if (customDestinationPath == null) {
if (File.separatorChar != '/') {
currentArg = currentArg.replace('/', File.separatorChar);