aboutsummaryrefslogtreecommitdiffstats
path: root/testing/newsrc
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2017-09-21 10:48:59 -0700
committerAndy Clement <aclement@pivotal.io>2017-09-21 10:48:59 -0700
commit26712118bad08e60c66237e6aa2cfbd6f275cbbe (patch)
tree64531f485c94c9f6e7f1acb8506bf51cc8343cf1 /testing/newsrc
parent39b70af69b0b086f82da8ac032de5e5a5e0cdc45 (diff)
parent6d6738cfece6328027916681e67e54225531db38 (diff)
downloadaspectj-26712118bad08e60c66237e6aa2cfbd6f275cbbe.tar.gz
aspectj-26712118bad08e60c66237e6aa2cfbd6f275cbbe.zip
Bring Java9 branch in line with 1.8.11 progress
Diffstat (limited to 'testing/newsrc')
-rw-r--r--testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java28
1 files changed, 24 insertions, 4 deletions
diff --git a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
index 6705a5847..18b9233dc 100644
--- a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
+++ b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
@@ -24,10 +24,6 @@ import java.util.List;
import java.util.Map;
import java.util.Stack;
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.apache.commons.digester.Digester;
import org.aspectj.apache.bcel.classfile.Attribute;
import org.aspectj.apache.bcel.classfile.JavaClass;
@@ -39,6 +35,12 @@ import org.aspectj.apache.bcel.util.SyntheticRepository;
import org.aspectj.tools.ajc.AjcTestCase;
import org.aspectj.tools.ajc.CompilationResult;
import org.aspectj.util.FileUtil;
+import org.aspectj.weaver.ResolvedMember;
+import org.aspectj.weaver.ResolvedType;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
/**
* Root class for all Test suites that are based on an AspectJ XML test suite file. Extends AjcTestCase allowing a mix of
@@ -463,5 +465,23 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
return new File(getClass().getResource(resourceName).getFile());
}
+ protected Method findMethod(JavaClass jc, String string) {
+ for (Method m : jc.getMethods()) {
+ if (m.getName().equals(string)) {
+ return m;
+ }
+ }
+ return null;
+ }
+
+ protected ResolvedMember findMethod(ResolvedType outerType, String string) {
+ for (ResolvedMember method: outerType.getDeclaredMethods()) {
+ if (method.getName().equals(string)) {
+ return method;
+ }
+ }
+ return null;
+ }
+
}