summaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2010-07-14 23:19:04 +0000
committeraclement <aclement>2010-07-14 23:19:04 +0000
commitb8a3689766433ec8990db7b5e09e6a491136f912 (patch)
tree214a0cf50f5903ad61c6578b44708a8cf0642ccf /org.aspectj.ajdt.core
parent46f0d562cd0126307678985c89956750d20c901c (diff)
downloadaspectj-b8a3689766433ec8990db7b5e09e6a491136f912.tar.gz
aspectj-b8a3689766433ec8990db7b5e09e6a491136f912.zip
generics
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java12
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java44
2 files changed, 36 insertions, 20 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
index 220b1f354..743783819 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
@@ -785,7 +785,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour
}
model.setRoot(new ProgramElement(structureModel, rootLabel, kind, new ArrayList()));
- model.setFileMap(new HashMap());
+ model.setFileMap(new HashMap<String, IProgramElement>());
// setStructureModel(model);
state.setStructureModel(structureModel);
// state.setRelationshipMap(AsmManager.getDefault().getRelationshipMap());
@@ -872,18 +872,16 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour
outputDir = buildConfig.getCompilationResultDestinationManager().getDefaultOutputLocation();
}
// ??? incremental issues
- for (Iterator i = buildConfig.getInJars().iterator(); i.hasNext();) {
- File inJar = (File) i.next();
+ for (File inJar : buildConfig.getInJars()) {
List<UnwovenClassFile> unwovenClasses = bcelWeaver.addJarFile(inJar, outputDir, false);
state.recordBinarySource(inJar.getPath(), unwovenClasses);
}
- for (Iterator i = buildConfig.getInpath().iterator(); i.hasNext();) {
- File inPathElement = (File) i.next();
+ for (File inPathElement : buildConfig.getInpath()) {
if (!inPathElement.isDirectory()) {
// its a jar file on the inpath
// the weaver method can actually handle dirs, but we don't call it, see next block
- List unwovenClasses = bcelWeaver.addJarFile(inPathElement, outputDir, true);
+ List<UnwovenClassFile> unwovenClasses = bcelWeaver.addJarFile(inPathElement, outputDir, true);
state.recordBinarySource(inPathElement.getPath(), unwovenClasses);
} else {
// add each class file in an in-dir individually, this gives us the best error reporting
@@ -892,7 +890,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour
File[] binSrcs = FileUtil.listFiles(inPathElement, binarySourceFilter);
for (int j = 0; j < binSrcs.length; j++) {
UnwovenClassFile ucf = bcelWeaver.addClassFile(binSrcs[j], inPathElement, outputDir);
- List ucfl = new ArrayList();
+ List<UnwovenClassFile> ucfl = new ArrayList<UnwovenClassFile>();
ucfl.add(ucf);
state.recordBinarySource(binSrcs[j].getPath(), ucfl);
}
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java
index 1e0551f2d..5acefcab1 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java
@@ -15,17 +15,19 @@ import java.util.List;
import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.IMessage;
-import org.aspectj.bridge.IMessageHolder;
import org.aspectj.bridge.IMessage.Kind;
+import org.aspectj.bridge.IMessageHolder;
/**
* @author Adrian
- *
- * Deliberately empty implementation of IMessageHolder
+ *
+ * Deliberately empty implementation of IMessageHolder
*/
public class TestMessageHolder implements IMessageHolder {
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.aspectj.bridge.IMessageHolder#hasAnyMessage(org.aspectj.bridge.IMessage.Kind, boolean)
*/
public boolean hasAnyMessage(Kind kind, boolean orGreater) {
@@ -33,7 +35,9 @@ public class TestMessageHolder implements IMessageHolder {
return false;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.aspectj.bridge.IMessageHolder#numMessages(org.aspectj.bridge.IMessage.Kind, boolean)
*/
public int numMessages(Kind kind, boolean orGreater) {
@@ -41,7 +45,9 @@ public class TestMessageHolder implements IMessageHolder {
return 0;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.aspectj.bridge.IMessageHolder#getMessages(org.aspectj.bridge.IMessage.Kind, boolean)
*/
public IMessage[] getMessages(Kind kind, boolean orGreater) {
@@ -49,15 +55,19 @@ public class TestMessageHolder implements IMessageHolder {
return null;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.aspectj.bridge.IMessageHolder#getUnmodifiableListView()
*/
- public List getUnmodifiableListView() {
+ public List<IMessage> getUnmodifiableListView() {
// TODO Auto-generated method stub
return null;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.aspectj.bridge.IMessageHolder#clearMessages()
*/
public void clearMessages() throws UnsupportedOperationException {
@@ -65,7 +75,9 @@ public class TestMessageHolder implements IMessageHolder {
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.aspectj.bridge.IMessageHandler#handleMessage(org.aspectj.bridge.IMessage)
*/
public boolean handleMessage(IMessage message) throws AbortException {
@@ -73,7 +85,9 @@ public class TestMessageHolder implements IMessageHolder {
return false;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.aspectj.bridge.IMessageHandler#isIgnoring(org.aspectj.bridge.IMessage.Kind)
*/
public boolean isIgnoring(Kind kind) {
@@ -81,7 +95,9 @@ public class TestMessageHolder implements IMessageHolder {
return false;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.aspectj.bridge.IMessageHandler#dontIgnore(org.aspectj.bridge.IMessage.Kind)
*/
public void dontIgnore(Kind kind) {
@@ -89,7 +105,9 @@ public class TestMessageHolder implements IMessageHolder {
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
*/
public void ignore(Kind kind) {