aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-09-30 14:58:56 +0000
committeracolyer <acolyer>2005-09-30 14:58:56 +0000
commitf74a5c0fc3634f080b6a1714bb4d5b25df2a914b (patch)
treee5397b4f42b616043f48bd4a1d527bd5b04cb5e6 /tests/java5
parent5051f8e49ff9ca7009b9b9b2b510941e45389d05 (diff)
downloadaspectj-f74a5c0fc3634f080b6a1714bb4d5b25df2a914b.tar.gz
aspectj-f74a5c0fc3634f080b6a1714bb4d5b25df2a914b.zip
updates to reflection library (largely javadoc, but with a few small tweaks)
Diffstat (limited to 'tests/java5')
-rw-r--r--tests/java5/ataspectj/annotationGen/PointcutsWithParams.aj14
-rw-r--r--tests/java5/ataspectj/annotationGen/ReferencePointcuts.aj4
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/java5/ataspectj/annotationGen/PointcutsWithParams.aj b/tests/java5/ataspectj/annotationGen/PointcutsWithParams.aj
index 6c1e3b8f3..1198f6fa9 100644
--- a/tests/java5/ataspectj/annotationGen/PointcutsWithParams.aj
+++ b/tests/java5/ataspectj/annotationGen/PointcutsWithParams.aj
@@ -8,19 +8,19 @@ public aspect PointcutsWithParams {
public static void main(String[] args) throws NoSuchPointcutException {
AjType myType = AjTypeSystem.getAjType(PointcutsWithParams.class);
- Pointcut p1 = myType.getPointcut("pc1");
- Class[] params = p1.getParameterTypes();
+ Pointcut p1 = myType.getDeclaredPointcut("pc1");
+ AjType<?>[] params = p1.getParameterTypes();
if (params.length != 1) throw new RuntimeException("expecting one param");
- if (!params[0].equals(String.class)) throw new RuntimeException("expecting a String");
+ if (!params[0].getJavaClass().equals(String.class)) throw new RuntimeException("expecting a String");
String[] names = p1.getParameterNames();
if (names.length != 1) throw new RuntimeException("expecting one name");
if (!names[0].equals("s")) throw new RuntimeException("expecting 's', found " + names[0]);
- Pointcut p2 = myType.getPointcut("pc2");
+ Pointcut p2 = myType.getDeclaredPointcut("pc2");
params = p2.getParameterTypes();
if (params.length != 3) throw new RuntimeException("expecting three params");
- if (!params[0].equals(Integer.class)) throw new RuntimeException("expecting an Integer");
- if (!params[1].equals(Double.class)) throw new RuntimeException("expecting a Double");
- if (!params[2].equals(String.class)) throw new RuntimeException("expecting a String");
+ if (!params[0].getJavaClass().equals(Integer.class)) throw new RuntimeException("expecting an Integer");
+ if (!params[1].getJavaClass().equals(Double.class)) throw new RuntimeException("expecting a Double");
+ if (!params[2].getJavaClass().equals(String.class)) throw new RuntimeException("expecting a String");
names = p2.getParameterNames();
if (names.length != 3) throw new RuntimeException("expecting one name");
if (!names[0].equals("i")) throw new RuntimeException("expecting 'i', found '" + names[0] + "'");
diff --git a/tests/java5/ataspectj/annotationGen/ReferencePointcuts.aj b/tests/java5/ataspectj/annotationGen/ReferencePointcuts.aj
index e6014d7da..37be4f1ff 100644
--- a/tests/java5/ataspectj/annotationGen/ReferencePointcuts.aj
+++ b/tests/java5/ataspectj/annotationGen/ReferencePointcuts.aj
@@ -8,10 +8,10 @@ public aspect ReferencePointcuts {
public static void main(String[] args) throws NoSuchPointcutException {
AjType myType = AjTypeSystem.getAjType(ReferencePointcuts.class);
- Pointcut p1 = myType.getPointcut("pc1");
+ Pointcut p1 = myType.getDeclaredPointcut("pc1");
if (!p1.getPointcutExpression().toString().equals("call(* *(..))"))
throw new RuntimeException("unexpected pc expression: " + p1.getPointcutExpression());
- Pointcut p2 = myType.getPointcut("pc2");
+ Pointcut p2 = myType.getDeclaredPointcut("pc2");
if (!p2.getPointcutExpression().toString().equals("(pc1() || execution(* *(..)))"))
throw new RuntimeException("unexpected pc expression: " + p2.getPointcutExpression());