private Path bootclasspath;
private Path extdirs;
private Path srcdir;
- private List argfiles;
+ private List<File> argfiles;
private boolean fork;
private boolean failonerror;
private boolean verbose;
public void setArgfile(File argfile) { // ajc-only eajc-also docDone
if (argfiles == null) {
- argfiles = new Vector();
+ argfiles = new Vector<>();
}
argfiles.add(argfile);
}
public void setArgfiles(String argfiles) { // ajc-only eajc-also docDone
StringTokenizer tok = new StringTokenizer(argfiles, ", ", false);
if (tok.hasMoreTokens() && this.argfiles == null) {
- this.argfiles = new Vector();
+ this.argfiles = new Vector<>();
}
while (tok.hasMoreTokens()) {
this.argfiles.add(project.resolveFile(tok.nextToken().trim()));
* The file is a line-delimited list of arguments
* these arguments are inserted into the argument list
*/
- private List argfiles;
+ private List<Argfile> argfiles;
/* ----------------------------------------------------------------------
public Argfile createArgfile() {
Argfile argfile = new Argfile();
if (argfiles == null) {
- argfiles = new ArrayList();
+ argfiles = new ArrayList<>();
}
argfiles.add(argfile);
return argfile;
* @see org.apache.tools.ant.taskdefs.Javac#scanDir
*/
protected void scanDir(File srcDir, File destDir, String files[]) {
- List newFiles = new ArrayList();
+ List<File> newFiles = new ArrayList<>();
// Add the files listed in the argfiles to the includes
- List newIncludes = new ArrayList();
- List newArguments = new ArrayList();
+ List<File> newIncludes = new ArrayList<>();
+ List<String> newArguments = new ArrayList<>();
if (argfiles != null) {
for (Object o : argfiles) {
File argfile = ((Argfile) o).getFile();
}
}
- private void expandArgfile(File argfile, List includes, List arguments) {
+ private void expandArgfile(File argfile, List<File> includes, List<String> arguments) {
log("argfile:" + argfile, Project.MSG_VERBOSE);
private static final String USAGE_SUBSTRING = "AspectJ-specific options";
/** valid -X[...] options other than -Xlint variants */
- private static final List VALID_XOPTIONS;
+ private static final List<String> VALID_XOPTIONS;
/** valid warning (-warn:[...]) variants */
- private static final List VALID_WARNINGS;
+ private static final List<String> VALID_WARNINGS;
/** valid debugging (-g:[...]) variants */
- private static final List VALID_DEBUG;
+ private static final List<String> VALID_DEBUG;
/**
* -Xlint variants (error, warning, ignore)
*
* @see org.aspectj.weaver.Lint
*/
- private static final List VALID_XLINT;
+ private static final List<String> VALID_XLINT;
public static final String COMMAND_EDITOR_NAME = AjcTask.class.getName() + ".COMMAND_EDITOR";
String editorClassName = System.getProperty(COMMAND_EDITOR_NAME);
if (null != editorClassName) {
ClassLoader cl = AjcTask.class.getClassLoader();
- Class editorClass = cl.loadClass(editorClassName);
+ Class<?> editorClass = cl.loadClass(editorClassName);
editor = (ICommandEditor) editorClass.getDeclaredConstructor().newInstance();
}
} catch (Throwable t) {
private Path aspectpath;
private Path argfiles;
private Path inxmlfiles;
- private List ignored;
+ private List<String> ignored;
private Path sourceRoots;
private File xweaveDir;
private String xdoneSignal;
private List<CompilerArg> compilerArgs;
// ----- added by adapter - integrate better?
- private List /* File */adapterFiles;
+ private List<File> adapterFiles;
private String[] adapterArguments;
private IMessageHolder messageHolder;
public void reset() { // XXX possible to reset MatchingTask?
// need declare for "all fields initialized in ..."
adapterArguments = null;
- adapterFiles = new ArrayList();
+ adapterFiles = new ArrayList<>();
compilerArgs = null;
argfiles = null;
inxmlfiles = null;
forkclasspath = null;
inIncrementalMode = false;
inIncrementalFileMode = false;
- ignored = new ArrayList();
+ ignored = new ArrayList<>();
injars = null;
inpath = null;
listFileArgs = false;
*/
public void setMessageHolderClass(String className) {
try {
- Class mclass = Class.forName(className);
+ Class<?> mclass = Class.forName(className);
IMessageHolder holder = (IMessageHolder) mclass.getDeclaredConstructor().newInstance();
setMessageHolder(holder);
} catch (Throwable t) {
*/
public void setCommandEditorClass(String className) { // skip Ant interface?
try {
- Class mclass = Class.forName(className);
+ Class<?> mclass = Class.forName(className);
setCommandEditor((ICommandEditor) mclass.getDeclaredConstructor().newInstance());
} catch (Throwable t) {
String m = "unable to instantiate command editor: " + className;
outjarFixedup = true;
}
- ArrayList result = new ArrayList(cmd.extractArguments());
+ ArrayList<String> result = new ArrayList(cmd.extractArguments());
addListArgs(result);
String[] command = (String[]) result.toArray(new String[0]);
// }
List extractArguments() {
- List result = new ArrayList();
+ List<String> result = new ArrayList<>();
String[] cmds = command.getArguments();
if (!LangUtil.isEmpty(cmds)) {
result.addAll(Arrays.asList(cmds));