diff options
Diffstat (limited to 'tests/java5')
-rw-r--r-- | tests/java5/ataspectj/ataspectj/DeclareParentsImplementsTest.java | 7 | ||||
-rw-r--r-- | tests/java5/ataspectj/ataspectj/DeclareParentsInterfaceTest.java | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsTest.java b/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsTest.java index 8b701a28e..b4cc9ed4e 100644 --- a/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsTest.java +++ b/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsTest.java @@ -50,10 +50,11 @@ public class DeclareParentsImplementsTest extends TestCase { @Aspect static class TestAspect { - @DeclareParents("ataspectj.DeclareParentsImplementsTest.Target") - public static Introduced i = new Implementation();//see here control of instantiation + @DeclareParents(value="ataspectj.DeclareParentsImplementsTest.Target", + defaultImpl=Implementation.class) + public static Introduced i; // will lead to: class Target implements Introduced { - // void intro(args) { TestAspect.i.intro(args); } + // void intro(args) { delegate to some hidden field, lazy initialized here for now } // } @Before("execution(* ataspectj.DeclareParentsImplementsTest.Introduced.intro())") diff --git a/tests/java5/ataspectj/ataspectj/DeclareParentsInterfaceTest.java b/tests/java5/ataspectj/ataspectj/DeclareParentsInterfaceTest.java index ffac0e4a2..2823251e5 100644 --- a/tests/java5/ataspectj/ataspectj/DeclareParentsInterfaceTest.java +++ b/tests/java5/ataspectj/ataspectj/DeclareParentsInterfaceTest.java @@ -15,6 +15,7 @@ import junit.framework.TestCase; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.DeclareImplements; +import org.aspectj.lang.annotation.DeclareParents; import java.util.Arrays; @@ -34,7 +35,7 @@ public class DeclareParentsInterfaceTest extends TestCase { @Aspect static class TestAspect { - @DeclareImplements("ataspectj.DeclareParentsInterfaceTest.Target") + @DeclareParents("ataspectj.DeclareParentsInterfaceTest.Target") Marker introduce; @Before("execution(* ataspectj.DeclareParentsInterfaceTest.Marker+.target())") |