aboutsummaryrefslogtreecommitdiffstats
path: root/ajde.core/src
diff options
context:
space:
mode:
authoraclement <aclement>2011-08-12 17:40:52 +0000
committeraclement <aclement>2011-08-12 17:40:52 +0000
commit5c22094479023f2a1d0804c9b82753e72150931c (patch)
treeac37e1f86047770fc1982709f60e301417af7886 /ajde.core/src
parentc6dbe6d1c446b40fc063e0587f0f3c2e7ac34237 (diff)
downloadaspectj-5c22094479023f2a1d0804c9b82753e72150931c.tar.gz
aspectj-5c22094479023f2a1d0804c9b82753e72150931c.zip
generics refactoring
Diffstat (limited to 'ajde.core/src')
-rw-r--r--ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java9
-rw-r--r--ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java6
-rw-r--r--ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java20
3 files changed, 18 insertions, 17 deletions
diff --git a/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java b/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java
index ecc939ad5..aa389f052 100644
--- a/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java
+++ b/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java
@@ -10,6 +10,7 @@
*******************************************************************/
package org.aspectj.ajde.core;
+import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -43,12 +44,12 @@ public interface ICompilerConfiguration extends CompilerConfigurationChangeFlags
/**
* @return a list of those files to include in the build
*/
- public List /* String */getProjectSourceFiles();
+ public List<String> getProjectSourceFiles();
/**
* @return a list of those files that should be used to configure a build
*/
- public List /* String */getProjectXmlConfigFiles();
+ public List<String> getProjectXmlConfigFiles();
/**
* Return a subset of those files we'd get on getProjectSourceFiles() - the subset that have changed since the last build. If
@@ -74,7 +75,7 @@ public interface ICompilerConfiguration extends CompilerConfigurationChangeFlags
* @return the set of input path elements for this compilation. Set members should be of the type java.io.File. An empty set or
* null is acceptable for this option. From -inpath
*/
- public Set /* java.io.File */getInpath();
+ public Set<File> getInpath();
/**
* @return the output jar file for the compilation results. Return null to leave classfiles unjar'd in output directory From
@@ -86,7 +87,7 @@ public interface ICompilerConfiguration extends CompilerConfigurationChangeFlags
* @return the set of aspect jar files to be used for the compilation. Returning null or an empty set disables this option. Set
* members should be of type java.io.File. From -aspectpath
*/
- public Set /* java.io.File */getAspectPath();
+ public Set<File> getAspectPath();
/**
* Get the set of non-Java resources for this compilation. Set members should be of type java.io.File. An empty set or null is
diff --git a/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java b/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java
index 605629ad4..41b921bbf 100644
--- a/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java
+++ b/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java
@@ -52,7 +52,7 @@ public interface IOutputLocationManager {
/**
* Return a list of all output locations handled by this OutputLocationManager
*/
- List /* File */getAllOutputLocations();
+ List<File> getAllOutputLocations();
/**
* Return the default output location (for example, <my_project>/bin). This is where classes which are on the inpath will be
@@ -72,8 +72,8 @@ public interface IOutputLocationManager {
/**
* @return a Map<File,String> from inpath absolute paths to handle components
*/
- Map getInpathMap();
-
+ Map<File, String> getInpathMap();
+
/**
* Callback from the compiler to indicate that a file has been removed from disk, the type of the file (if known) is also
* supplied.
diff --git a/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java b/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java
index 4895ccc62..72887ba19 100644
--- a/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java
+++ b/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java
@@ -167,7 +167,7 @@ public class AjdeCoreBuildManager {
+ compilerConfig.getNonStandardOptions() + "\n-> javaoptions:" + formatMap(compilerConfig.getJavaOptionsMap());
}
- private String formatCollection(Collection options) {
+ private String formatCollection(Collection<?> options) {
if (options == null) {
return "<default>";
}
@@ -176,7 +176,7 @@ public class AjdeCoreBuildManager {
}
StringBuffer formattedOptions = new StringBuffer();
- Iterator it = options.iterator();
+ Iterator<?> it = options.iterator();
while (it.hasNext()) {
String o = it.next().toString();
if (formattedOptions.length() > 0) {
@@ -222,11 +222,11 @@ public class AjdeCoreBuildManager {
if (configFile.exists() && configFile.isFile()) {
args = new String[] { "@" + configFile.getAbsolutePath() };
} else {
- List l = compilerConfig.getProjectSourceFiles();
+ List<String> l = compilerConfig.getProjectSourceFiles();
if (l == null) {
return null;
}
- List xmlfiles = compilerConfig.getProjectXmlConfigFiles();
+ List<String> xmlfiles = compilerConfig.getProjectXmlConfigFiles();
if (xmlfiles != null && !xmlfiles.isEmpty()) {
args = new String[l.size() + xmlfiles.size() + 1];
// TODO speedup
@@ -253,8 +253,8 @@ public class AjdeCoreBuildManager {
String propcp = compilerConfig.getClasspath();
if (propcp != null && propcp.length() != 0) {
StringTokenizer st = new StringTokenizer(propcp, File.pathSeparator);
- List configClasspath = config.getClasspath();
- ArrayList toAdd = new ArrayList();
+ List<String> configClasspath = config.getClasspath();
+ ArrayList<String> toAdd = new ArrayList<String>();
while (st.hasMoreTokens()) {
String entry = st.nextToken();
if (!configClasspath.contains(entry)) {
@@ -262,7 +262,7 @@ public class AjdeCoreBuildManager {
}
}
if (0 < toAdd.size()) {
- ArrayList both = new ArrayList(configClasspath.size() + toAdd.size());
+ ArrayList<String> both = new ArrayList<String>(configClasspath.size() + toAdd.size());
both.addAll(configClasspath);
both.addAll(toAdd);
config.setClasspath(both);
@@ -360,7 +360,7 @@ public class AjdeCoreBuildManager {
// Break a string into a string array of non-standard options.
// Allows for one option to include a ' '. i.e. assuming it has been quoted, it
// won't accidentally get treated as a pair of options (can be needed for xlint props file option)
- List tokens = new ArrayList();
+ List<String> tokens = new ArrayList<String>();
int ind = nonStdOptions.indexOf('\"');
int ind2 = nonStdOptions.indexOf('\"', ind + 1);
if ((ind > -1) && (ind2 > -1)) { // dont tokenize within double quotes
@@ -387,8 +387,8 @@ public class AjdeCoreBuildManager {
}
/** Local helper method for splitting option strings */
- private List tokenizeString(String str) {
- List tokens = new ArrayList();
+ private List<String> tokenizeString(String str) {
+ List<String> tokens = new ArrayList<String>();
StringTokenizer tok = new StringTokenizer(str);
while (tok.hasMoreTokens()) {
tokens.add(tok.nextToken());