aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2018-02-28 11:53:14 -0800
committerAndy Clement <aclement@pivotal.io>2018-03-09 17:18:45 -0800
commit7d47cba01043c93bab95b59e66b727580351e85f (patch)
tree07a7fed0235f2d0e3b9221ebf097e5c24d16aaf0 /org.aspectj.ajdt.core
parent6b620ba3aa4b0c9d29560dfa42f8c67dcafb1229 (diff)
downloadaspectj-7d47cba01043c93bab95b59e66b727580351e85f.tar.gz
aspectj-7d47cba01043c93bab95b59e66b727580351e85f.zip
Bug#531694: generate more optional thisJoinPoint construction code
This commit introduces some new methods into the runtime Factory class and modifies code generation to use them (and to use the form of the LDC bytecode that loads class constants).
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java4
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java20
2 files changed, 23 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
index ada5639ef..032719165 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
@@ -807,8 +807,10 @@ public class BuildArgParser extends Main {
buildConfig.setTargetAspectjRuntimeLevel(Constants.RUNTIME_LEVEL_12);
} else if (arg.endsWith(":1.5")) {
buildConfig.setTargetAspectjRuntimeLevel(Constants.RUNTIME_LEVEL_15);
+ } else if (arg.endsWith(":1.9")) {
+ buildConfig.setTargetAspectjRuntimeLevel(Constants.RUNTIME_LEVEL_19);
} else {
- showError("-Xajruntimetarget:<level> only supports a target level of 1.2 or 1.5");
+ showError("-Xajruntimetarget:<level> supports a target level of 1.2, 1.5, 1.9");
}
} else if (arg.equals("-timers")) {
buildConfig.setTiming(true);
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java
index b92a4b439..4c7873df0 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
+import java.util.StringTokenizer;
public class ConfigParser {
Location location;
@@ -44,6 +45,13 @@ public class ConfigParser {
for (int i = 0; i < argsArray.length; i++) {
args.add(new Arg(argsArray[i], location));
}
+ String aspectjOptions = System.getProperty("ASPECTJ_OPTS");
+ if (aspectjOptions != null) {
+ StringTokenizer st = new StringTokenizer(aspectjOptions);
+ while (st.hasMoreElements()) {
+ args.add(new Arg(st.nextToken(),location));
+ }
+ }
parseArgs(args);
}
@@ -138,12 +146,14 @@ public class ConfigParser {
if (sourceFile.getName().charAt(0) == '*') {
if (sourceFile.getName().equals("*.java")) {
addFiles(sourceFile.getParentFile(), new FileFilter() {
+ @Override
public boolean accept(File f) {
return f != null && f.getName().endsWith(".java");
}
});
} else if (sourceFile.getName().equals("*.aj")) {
addFiles(sourceFile.getParentFile(), new FileFilter() {
+ @Override
public boolean accept(File f) {
return f != null && f.getName().endsWith(".aj");
}
@@ -287,6 +297,7 @@ public class ConfigParser {
private Location location;
private String value;
+ @Override
public String toString() {
return "Arg[location="+location+" value="+value+"]";
}
@@ -320,6 +331,7 @@ public class ConfigParser {
public abstract int getLine();
+ @Override
public abstract String toString();
}
@@ -332,36 +344,44 @@ public class ConfigParser {
this.file = file;
}
+ @Override
public File getFile() {
return file;
}
+ @Override
public File getDirectory() {
return file.getParentFile();
}
+ @Override
public int getLine() {
return line;
}
+ @Override
public String toString() {
return file.getPath() + ":" + line;
}
}
static class CommandLineLocation extends Location {
+ @Override
public File getFile() {
return new File(System.getProperty("user.dir"));
}
+ @Override
public File getDirectory() {
return new File(System.getProperty("user.dir"));
}
+ @Override
public int getLine() {
return -1;
}
+ @Override
public String toString() {
return "command-line";
}