aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2013-01-21 17:56:20 -0800
committerAndy Clement <andrew.clement@gmail.com>2013-01-21 17:56:20 -0800
commitf54f44a104806b06ab72b223c55d71476c95415d (patch)
tree990b928064e6cc988086f8402c9da22681c5534c /testing
parent96ebaaed65fe5d507cae3d56126d76f217a9f13a (diff)
downloadaspectj-f54f44a104806b06ab72b223c55d71476c95415d.tar.gz
aspectj-f54f44a104806b06ab72b223c55d71476c95415d.zip
Allow code generation hints for generated compiler names
Diffstat (limited to 'testing')
-rw-r--r--testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
index d4e46973d..9ecd5d885 100644
--- a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
+++ b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
@@ -31,6 +31,7 @@ import org.apache.commons.digester.Digester;
import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.LocalVariable;
import org.aspectj.apache.bcel.classfile.LocalVariableTable;
+import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.apache.bcel.util.ClassPath;
import org.aspectj.apache.bcel.util.SyntheticRepository;
import org.aspectj.tools.ajc.AjcTestCase;
@@ -54,7 +55,7 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
public XMLBasedAjcTestCase() {
}
-
+
/**
* You must define a suite() method in subclasses, and return the result of calling this method. (Don't you hate static methods
* in programming models). For example:
@@ -317,6 +318,18 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
return repos.loadClass(clazzname);
}
+ protected Method getMethodStartsWith(JavaClass jc, String prefix) {
+ Method[] meths = jc.getMethods();
+ for (int i = 0; i < meths.length; i++) {
+ Method method = meths[i];
+ System.out.println(method);
+ if (method.getName().startsWith(prefix)) {
+ return method;
+ }
+ }
+ return null;
+ }
+
/**
* Sort it by name then start position
*/