Browse Source

293510: testcode

tags/V1_6_7
aclement 14 years ago
parent
commit
02f0fe5cdb

+ 12
- 0
tests/bugs167/pr293510/A.java View File

@@ -0,0 +1,12 @@

@Foo
class A {
public void m() {}
}

aspect X {
//before(): execution(* (@Foo *..*).*(..)) {}
before(): execution(* (@Foo *).*(..)) {}
}

@interface Foo {}

+ 18
- 0
tests/bugs167/pr293510/CaseOne.java View File

@@ -0,0 +1,18 @@
package pkg;

import java.lang.annotation.*;

class A {public void m() {}}

class B extends A {public void m() {}}

@Marker
class C extends B {public void m() {}}

aspect X {
pointcut p(): execution(* (@Marker *).*(..));
before(): p() {}
}

@Retention(RetentionPolicy.RUNTIME)
@interface Marker {}

+ 17
- 0
tests/bugs167/pr293510/CaseTwo.java View File

@@ -0,0 +1,17 @@
package pkg;

import java.lang.annotation.*;

class A {public void m() {}}

class B extends A {public void m() {}}

class C extends B {public void m() {}}

aspect X {
pointcut p(): execution(* C.*(..));
before(): p() {}
}

@Retention(RetentionPolicy.RUNTIME)
@interface Marker {}

+ 6
- 0
tests/bugs167/pr293510/MyService.java View File

@@ -0,0 +1,6 @@
package ex;

@Service
class MyService {
public void serve() {}
}

+ 6
- 0
tests/bugs167/pr293510/RooLikeAspect.java View File

@@ -0,0 +1,6 @@
package ex;

aspect RooLikeAspect {
public void MyService.serve_itd() {
}
}

+ 6
- 0
tests/bugs167/pr293510/Service.java View File

@@ -0,0 +1,6 @@
package ex;
import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
@interface Service {
}

+ 14
- 0
tests/bugs167/pr293510/SupplyMethodCollectedToService.java View File

@@ -0,0 +1,14 @@
package ex;

aspect SupplyMethodCollectedToService {
declare @type: @Service * : @MethodCollected;
pointcut collected() :@within(MethodCollected) && execution(* *(..));
// pointcut collected2() : execution(* (@MethodCollected *).*(..));
before() : collected() {
// Should advice both serve() and serve_itd()
}
// before() : collected2() { }
}
@interface MethodCollected {}

Loading…
Cancel
Save