aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/pr108245.aj
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-30 11:39:23 +0000
committeracolyer <acolyer>2005-08-30 11:39:23 +0000
commit2ec1f35b5c9f4374970fbe33f1be86dc615253ab (patch)
tree75da6fd3b5bfa1d3bae91ad547a5c2f0ddbd9b50 /tests/bugs150/pr108245.aj
parent27e68f3b3ae82408e8e046a40ab69d9e4996ff5a (diff)
downloadaspectj-2ec1f35b5c9f4374970fbe33f1be86dc615253ab.tar.gz
aspectj-2ec1f35b5c9f4374970fbe33f1be86dc615253ab.zip
tests for pr108425 and pr108104
Diffstat (limited to 'tests/bugs150/pr108245.aj')
-rw-r--r--tests/bugs150/pr108245.aj40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/bugs150/pr108245.aj b/tests/bugs150/pr108245.aj
new file mode 100644
index 000000000..8c19ca435
--- /dev/null
+++ b/tests/bugs150/pr108245.aj
@@ -0,0 +1,40 @@
+import java.io.Serializable;
+import java.lang.annotation.*;
+import java.lang.*;
+
+class Bean implements Serializable{
+
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ @propertyChanger()
+ public void setName( String name ) {
+ this.name = name;
+ }
+}
+
+
+
+@Retention( RetentionPolicy.RUNTIME )
+@Target({ ElementType.METHOD })
+@interface propertyChanger {
+}
+
+aspect pr108245 {
+
+ public static void main(String[] args) {
+ Bean b = new Bean();
+ b.setName("hasBean");
+ }
+
+ pointcut callSetter( Bean b )
+ : call( @propertyChanger * *(..) ) && target( b );
+
+ before(Bean b) : callSetter(b) {
+ System.out.println("before " + b);
+ }
+
+} \ No newline at end of file