diff options
Diffstat (limited to 'tests/bugs153/pr155972')
-rw-r--r-- | tests/bugs153/pr155972/ConstructorTest.java | 8 | ||||
-rw-r--r-- | tests/bugs153/pr155972/FieldTest.java | 9 | ||||
-rw-r--r-- | tests/bugs153/pr155972/InitializerTest.java | 8 | ||||
-rw-r--r-- | tests/bugs153/pr155972/SignatureImplAspect.aj | 30 |
4 files changed, 55 insertions, 0 deletions
diff --git a/tests/bugs153/pr155972/ConstructorTest.java b/tests/bugs153/pr155972/ConstructorTest.java new file mode 100644 index 000000000..f3aac9072 --- /dev/null +++ b/tests/bugs153/pr155972/ConstructorTest.java @@ -0,0 +1,8 @@ + +public class ConstructorTest { + + public static void main(String[] args) { + new ConstructorTest(); + } + +} diff --git a/tests/bugs153/pr155972/FieldTest.java b/tests/bugs153/pr155972/FieldTest.java new file mode 100644 index 000000000..53ae50f63 --- /dev/null +++ b/tests/bugs153/pr155972/FieldTest.java @@ -0,0 +1,9 @@ +public class FieldTest { + + private static int intField; + + public static void main(String[] args) { + intField = 999; + } + +} diff --git a/tests/bugs153/pr155972/InitializerTest.java b/tests/bugs153/pr155972/InitializerTest.java new file mode 100644 index 000000000..94b3ed434 --- /dev/null +++ b/tests/bugs153/pr155972/InitializerTest.java @@ -0,0 +1,8 @@ + +public class InitializerTest { + + + public static void main(String[] args) { + } + +} diff --git a/tests/bugs153/pr155972/SignatureImplAspect.aj b/tests/bugs153/pr155972/SignatureImplAspect.aj new file mode 100644 index 000000000..e28eb1bdc --- /dev/null +++ b/tests/bugs153/pr155972/SignatureImplAspect.aj @@ -0,0 +1,30 @@ + + +import java.lang.reflect.Member; + +import org.aspectj.lang.reflect.ConstructorSignature; +import org.aspectj.lang.reflect.FieldSignature; +import org.aspectj.lang.reflect.InitializerSignature; + +public aspect SignatureImplAspect { + before () : (execution(ConstructorTest.new(..))) { + //thisJoinPointStaticPart.getSignature().getDeclaringType(); + Member m = ((ConstructorSignature) thisJoinPointStaticPart + .getSignature()).getConstructor(); + System.out.println(m.getName()); + } + + before() : set(int FieldTest.intField) { + //thisJoinPointStaticPart.getSignature().getDeclaringType(); + Member m = ((FieldSignature) thisJoinPointStaticPart + .getSignature()).getField(); + System.out.println(m.getName()); + } + + before() : staticinitialization(InitializerTest) { + //thisJoinPointStaticPart.getSignature().getDeclaringType(); + Member m = ((InitializerSignature) thisJoinPointStaticPart + .getSignature()).getInitializer(); + System.out.println(m.getName()); + } +} |