aboutsummaryrefslogtreecommitdiffstats
path: root/tests/base/test135/pack/JoinPointFields.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/base/test135/pack/JoinPointFields.java')
-rw-r--r--tests/base/test135/pack/JoinPointFields.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/base/test135/pack/JoinPointFields.java b/tests/base/test135/pack/JoinPointFields.java
new file mode 100644
index 000000000..c541ba2a4
--- /dev/null
+++ b/tests/base/test135/pack/JoinPointFields.java
@@ -0,0 +1,35 @@
+package test135.pack;
+
+import org.aspectj.lang.*;
+import org.aspectj.lang.reflect.*;
+
+// a first try at a library class in the test suite
+public abstract aspect JoinPointFields {
+ public String className;
+ public String methodName;
+ public String[] parameterNames;
+ public Class[] parameterTypes;
+ public Object[] parameters;
+
+ protected int protectedField = 42;
+
+ abstract protected pointcut onTypes();
+
+ before(): call(!static * *(..)) && onTypes() && !within(JoinPointFields+) {
+ System.out.println(thisJoinPoint);
+
+ Signature sig = thisJoinPoint.getSignature();
+ CodeSignature codeSig = (CodeSignature) sig;
+ //ReceptionJoinPoint rjp = (ReceptionJoinPoint) thisJoinPoint;
+
+ className = sig.getDeclaringType().getName();
+ System.out.println(className);
+
+ methodName = sig.getName();
+ parameterNames = codeSig.getParameterNames();
+ parameterTypes = codeSig.getParameterTypes();
+ //parameters = rjp.getParameters();
+ parameters = thisJoinPoint.getArgs();
+ System.out.println("DONE: " + thisJoinPoint);
+ }
+}