diff options
author | acolyer <acolyer> | 2005-02-17 21:11:31 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-02-17 21:11:31 +0000 |
commit | 900e12978dc17c3f9d7842764a48653712578e9b (patch) | |
tree | 7769a4926bd291dd0b45742ecb7d59a5facd2801 /tests | |
parent | fdc14b8ff96b4a3c16b7cdf933c16fd9320ee3c1 (diff) | |
download | aspectj-900e12978dc17c3f9d7842764a48653712578e9b.tar.gz aspectj-900e12978dc17c3f9d7842764a48653712578e9b.zip |
@xxx(@Foo) -> @xxx(Foo)
Diffstat (limited to 'tests')
10 files changed, 29 insertions, 29 deletions
diff --git a/tests/java5/annotations/AnnotationAspect03.aj b/tests/java5/annotations/AnnotationAspect03.aj index 04399e188..0d67221e9 100644 --- a/tests/java5/annotations/AnnotationAspect03.aj +++ b/tests/java5/annotations/AnnotationAspect03.aj @@ -1,6 +1,6 @@ public aspect AnnotationAspect03 { - declare warning : execution(* *.*(..)) && @annotation(@SimpleAnnotation) + declare warning : execution(* *.*(..)) && @annotation(SimpleAnnotation) : "@annotation matched here"; diff --git a/tests/java5/annotations/args/AtArgsAspect.java b/tests/java5/annotations/args/AtArgsAspect.java index 010808ef0..2e0200002 100644 --- a/tests/java5/annotations/args/AtArgsAspect.java +++ b/tests/java5/annotations/args/AtArgsAspect.java @@ -62,62 +62,62 @@ public aspect AtArgsAspect { // Non-inherited // test 5 - before() : myMethod() && @args(@MyAnnotation,..) { + before() : myMethod() && @args(MyAnnotation,..) { System.out.print("@args(@MyAnnotation,..): "); System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } - before() : myMethod() && !@args(@MyAnnotation,..) { + before() : myMethod() && !@args(MyAnnotation,..) { System.out.print("@args(@MyAnnotation,..): "); System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } // test 6 - before() : myMethod() && @args(@MyAnnotation,*,*,@MyAnnotation,*) { + before() : myMethod() && @args(MyAnnotation,*,*,MyAnnotation,*) { System.out.print("@args(@MyAnnotation,*,*,@MyAnnotation,*): "); System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } - before() : myMethod() && !@args(@MyAnnotation,*,*,@MyAnnotation,*) { + before() : myMethod() && !@args(MyAnnotation,*,*,MyAnnotation,*) { System.out.print("@args(@MyAnnotation,*,*,@MyAnnotation,*): "); System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } // test 7 - before() : myMethod() && @args(@MyAnnotation,*,*,@MyAnnotation,@MyAnnotation) { + before() : myMethod() && @args(MyAnnotation,*,*,MyAnnotation,MyAnnotation) { System.out.print("@args(@MyAnnotation,*,*,@MyAnnotation,@MyAnnotation): "); System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } - before() : myMethod() && !@args(@MyAnnotation,*,*,@MyAnnotation,@MyAnnotation) { + before() : myMethod() && !@args(MyAnnotation,*,*,MyAnnotation,MyAnnotation) { System.out.print("@args(@MyAnnotation,*,*,@MyAnnotation,@MyAnnotation): "); System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } // Inherited // test 8 - before() : myMethod() && @args(..,@MyInheritableAnnotation,*) { + before() : myMethod() && @args(..,MyInheritableAnnotation,*) { System.out.print("@args(..,@MyInheritableAnnotation,*): "); System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } - @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && !@args(..,@MyInheritableAnnotation,*) { + @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && !@args(..,MyInheritableAnnotation,*) { System.out.print("@args(..,@MyInheritableAnnotation,*): "); System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } // test 9 - before() : myMethod() && @args(..,@MyInheritableAnnotation,@MyInheritableAnnotation) { + before() : myMethod() && @args(..,MyInheritableAnnotation,MyInheritableAnnotation) { System.out.print("@args(..,@MyInheritableAnnotation,@MyInheritableAnnotation): "); System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } - @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && !@args(..,@MyInheritableAnnotation,@MyInheritableAnnotation) { + @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && !@args(..,MyInheritableAnnotation,MyInheritableAnnotation) { System.out.print("@args(..,@MyInheritableAnnotation,@MyInheritableAnnotation): "); System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } // test 10 - before() : myMethod() && @args(..,@MyInheritableAnnotation,@MyInheritableAnnotation,@MyInheritableAnnotation) { + before() : myMethod() && @args(..,MyInheritableAnnotation,MyInheritableAnnotation,MyInheritableAnnotation) { System.out.print("@args(..,@MyInheritableAnnotation,@MyInheritableAnnotation,@MyInheritableAnnotation): "); System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } - before() : myMethod() && !@args(..,@MyInheritableAnnotation,@MyInheritableAnnotation,@MyInheritableAnnotation) { + before() : myMethod() && !@args(..,MyInheritableAnnotation,MyInheritableAnnotation,MyInheritableAnnotation) { System.out.print("@args(..,@MyInheritableAnnotation,@MyInheritableAnnotation,@MyInheritableAnnotation): "); System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL"); } diff --git a/tests/java5/annotations/args/DeclareEoW.java b/tests/java5/annotations/args/DeclareEoW.java index 2c598e42f..b5c58a013 100644 --- a/tests/java5/annotations/args/DeclareEoW.java +++ b/tests/java5/annotations/args/DeclareEoW.java @@ -1,5 +1,5 @@ public aspect DeclareEoW { - declare warning : @args(@MyAnnotation) : "@args is not allowed in declares..."; + declare warning : @args(MyAnnotation) : "@args is not allowed in declares..."; }
\ No newline at end of file diff --git a/tests/java5/annotations/attarget/AtTargetAspect.java b/tests/java5/annotations/attarget/AtTargetAspect.java index 8e9238262..d9981b372 100644 --- a/tests/java5/annotations/attarget/AtTargetAspect.java +++ b/tests/java5/annotations/attarget/AtTargetAspect.java @@ -1,6 +1,6 @@ public aspect AtTargetAspect { - before(): call(* *(..)) && @target(@MyAnnotation) { + before(): call(* *(..)) && @target(MyAnnotation) { System.err.println("advice running"); } diff --git a/tests/java5/annotations/binding/AtArgs3.aj b/tests/java5/annotations/binding/AtArgs3.aj index ee2fbccc1..dcd102233 100644 --- a/tests/java5/annotations/binding/AtArgs3.aj +++ b/tests/java5/annotations/binding/AtArgs3.aj @@ -20,7 +20,7 @@ aspect X { static boolean b = false;
- before(): call(* m(..)) && !within(X) && @args(@Colored) {
+ before(): call(* m(..)) && !within(X) && @args(Colored) {
b=true;
}
diff --git a/tests/java5/annotations/binding/complexExample/X.java b/tests/java5/annotations/binding/complexExample/X.java index b442e3a99..141975a16 100644 --- a/tests/java5/annotations/binding/complexExample/X.java +++ b/tests/java5/annotations/binding/complexExample/X.java @@ -3,11 +3,11 @@ import d.e.f.Color; public aspect X { - before(): call(* *(..)) && @annotation(@Color) { + before(): call(* *(..)) && @annotation(Color) { System.err.println("Before call to "+thisJoinPoint); } - before(): execution(* *(..)) && @annotation(@Color) { + before(): execution(* *(..)) && @annotation(Color) { System.err.println("Before execution of "+thisJoinPoint); } } diff --git a/tests/java5/annotations/thisOrtarget/DeclareEoW.java b/tests/java5/annotations/thisOrtarget/DeclareEoW.java index 491e5400d..4b7252fef 100644 --- a/tests/java5/annotations/thisOrtarget/DeclareEoW.java +++ b/tests/java5/annotations/thisOrtarget/DeclareEoW.java @@ -1,7 +1,7 @@ public aspect DeclareEoW { - declare warning : @this(@MyAnnotation) : "should give compilation error"; + declare warning : @this(MyAnnotation) : "should give compilation error"; - declare error : @target(@MyAnnotation) : "should give compilation error"; + declare error : @target(MyAnnotation) : "should give compilation error"; }
\ No newline at end of file diff --git a/tests/java5/annotations/thisOrtarget/NotRuntimeRetention.aj b/tests/java5/annotations/thisOrtarget/NotRuntimeRetention.aj index ea38a52c4..03728c599 100644 --- a/tests/java5/annotations/thisOrtarget/NotRuntimeRetention.aj +++ b/tests/java5/annotations/thisOrtarget/NotRuntimeRetention.aj @@ -4,13 +4,13 @@ public aspect NotRuntimeRetention { pointcut doSomethingCall() : call(* doSomething()); // CE L7 - before() : doSomethingExecution() && @this(@MyClassRetentionAnnotation) { + before() : doSomethingExecution() && @this(MyClassRetentionAnnotation) { // should be compile-time error! System.out.println("How did I get here?"); } // CE L13 - after() returning : doSomethingCall() && @target(@MyClassRetentionAnnotation) { + after() returning : doSomethingCall() && @target(MyClassRetentionAnnotation) { // should be compile-time error! System.out.println("How did I get here?"); } diff --git a/tests/java5/annotations/thisOrtarget/ThisOrTargetTests.aj b/tests/java5/annotations/thisOrtarget/ThisOrTargetTests.aj index 2936b2ec5..e0fc46d63 100644 --- a/tests/java5/annotations/thisOrtarget/ThisOrTargetTests.aj +++ b/tests/java5/annotations/thisOrtarget/ThisOrTargetTests.aj @@ -16,14 +16,14 @@ public aspect ThisOrTargetTests { pointcut doSomethingExecution() : execution(* doSomething());
pointcut doSomethingCall() : call(* doSomething());
- before() : doSomethingExecution() && @this(@MyAnnotation) {
+ before() : doSomethingExecution() && @this(MyAnnotation) {
// should match:
// b.doSomething(), reallyB.doSomething() [with test],
// c.doSomething()
add(before1Matches,thisJoinPointStaticPart);
}
- before() : doSomethingExecution() && @this(@MyInheritableAnnotation) {
+ before() : doSomethingExecution() && @this(MyInheritableAnnotation) {
// should match:
// c.doSomething()
// d.doSomething()
@@ -31,14 +31,14 @@ public aspect ThisOrTargetTests { add(before2Matches,thisJoinPointStaticPart);
}
- after() returning : doSomethingCall() && @target(@MyAnnotation) {
+ after() returning : doSomethingCall() && @target(MyAnnotation) {
// should match:
// b.doSomething(), reallyB.doSomething() [with test],
// c.doSomething()
add(after1Matches,thisJoinPointStaticPart);
}
- after() returning : doSomethingCall() && @target(@MyInheritableAnnotation) {
+ after() returning : doSomethingCall() && @target(MyInheritableAnnotation) {
// should match:
// c.doSomething()
// d.doSomething()
diff --git a/tests/java5/annotations/within_code/WithinAndWithinCodeTests.java b/tests/java5/annotations/within_code/WithinAndWithinCodeTests.java index 96ed0188d..139b72d5d 100644 --- a/tests/java5/annotations/within_code/WithinAndWithinCodeTests.java +++ b/tests/java5/annotations/within_code/WithinAndWithinCodeTests.java @@ -1,14 +1,14 @@ public aspect WithinAndWithinCodeTests { // should be two matches, L32 and L39 - declare warning : execution(* doSomething(..)) && @within(@MyAnnotation) + declare warning : execution(* doSomething(..)) && @within(MyAnnotation) : "@within match on non-inherited annotation"; // one match on L39 - declare warning : execution(* doSomething(..)) && @within(@MyInheritableAnnotation) + declare warning : execution(* doSomething(..)) && @within(MyInheritableAnnotation) : "@within match on inheritable annotation"; // one match on L32 - declare warning : call(* doSomething(..)) && @withincode(@MyClassRetentionAnnotation) + declare warning : call(* doSomething(..)) && @withincode(MyClassRetentionAnnotation) : "@withincode match"; }
\ No newline at end of file |