public int adviceSequenceNumberInType;
public MethodBinding proceedMethodBinding; // set during this.resolveStaments, referenced by Proceed
- public List<Proceed> proceedCalls = new ArrayList<>(2); // populated during Proceed.findEnclosingAround
+ public List<Proceed> proceedCalls = new ArrayList<Proceed>(2); // populated during Proceed.findEnclosingAround
private boolean proceedInInners;
private ResolvedMember[] proceedCallSignatures;
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;
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
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;
+ }
+
}
if ((null == array) || (1 > array.length)) {
return Collections.emptyList();
}
- ArrayList<T> list = new ArrayList<>();
+ ArrayList<T> list = new ArrayList<T>();
list.addAll(Arrays.asList(array));
return list;
}