summaryrefslogtreecommitdiffstats
path: root/aspectj5rt
diff options
context:
space:
mode:
authoraclement <aclement>2005-04-12 15:05:12 +0000
committeraclement <aclement>2005-04-12 15:05:12 +0000
commitead3a2c5810fd37b9753f1344df8ddd308b1289d (patch)
tree72a4c98b25af70816e3dd96ab814df21325ca00c /aspectj5rt
parent914a6656eb6a47ac66a7bbb8c5b0c15b98100c80 (diff)
downloadaspectj-ead3a2c5810fd37b9753f1344df8ddd308b1289d.tar.gz
aspectj-ead3a2c5810fd37b9753f1344df8ddd308b1289d.zip
From The Branch: Alex's new annotations for annotation style development
Diffstat (limited to 'aspectj5rt')
-rw-r--r--aspectj5rt/java5-src/org/aspectj/lang/annotation/After.java25
-rw-r--r--aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterReturning.java35
-rw-r--r--aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterThrowing.java35
-rw-r--r--aspectj5rt/java5-src/org/aspectj/lang/annotation/Around.java25
-rw-r--r--aspectj5rt/java5-src/org/aspectj/lang/annotation/Aspect.java27
-rw-r--r--aspectj5rt/java5-src/org/aspectj/lang/annotation/Before.java26
-rw-r--r--aspectj5rt/java5-src/org/aspectj/lang/annotation/DeclarePrecedence.java26
-rw-r--r--aspectj5rt/java5-src/org/aspectj/lang/annotation/Pointcut.java25
8 files changed, 224 insertions, 0 deletions
diff --git a/aspectj5rt/java5-src/org/aspectj/lang/annotation/After.java b/aspectj5rt/java5-src/org/aspectj/lang/annotation/After.java
new file mode 100644
index 000000000..418a360ec
--- /dev/null
+++ b/aspectj5rt/java5-src/org/aspectj/lang/annotation/After.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) Jonas Bonér, Alexandre Vasseur
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *******************************************************************************/
+package org.aspectj.lang.annotation;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * After finally advice
+ *
+ * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
+ */
+@Target(ElementType.METHOD)
+public @interface After {
+
+ /**
+ * The pointcut expression where to bind the advice
+ */
+ String value();
+}
diff --git a/aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterReturning.java b/aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterReturning.java
new file mode 100644
index 000000000..2dd785952
--- /dev/null
+++ b/aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterReturning.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) Jonas Bonér, Alexandre Vasseur
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *******************************************************************************/
+package org.aspectj.lang.annotation;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * After returning advice
+ *
+ * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
+ */
+@Target(ElementType.METHOD)
+public @interface AfterReturning {
+
+ /**
+ * The pointcut expression where to bind the advice
+ */
+ String value() default "";
+
+ /**
+ * The pointcut expression where to bind the advice, overrides "value" when specified
+ */
+ String pointcut() default "";
+
+ /**
+ * The name of the argument in the advice signature to bind the returned value to
+ */
+ String returning() default "";
+}
diff --git a/aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterThrowing.java b/aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterThrowing.java
new file mode 100644
index 000000000..6e07865c6
--- /dev/null
+++ b/aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterThrowing.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) Jonas Bonér, Alexandre Vasseur
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *******************************************************************************/
+package org.aspectj.lang.annotation;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * After throwing advice
+ *
+ * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
+ */
+@Target(ElementType.METHOD)
+public @interface AfterThrowing {
+
+ /**
+ * The pointcut expression where to bind the advice
+ */
+ String value() default "";
+
+ /**
+ * The pointcut expression where to bind the advice, overrides "value" when specified
+ */
+ String pointcut() default "";
+
+ /**
+ * The name of the argument in the advice signature to bind the thrown exception to
+ */
+ String throwing() default "";
+}
diff --git a/aspectj5rt/java5-src/org/aspectj/lang/annotation/Around.java b/aspectj5rt/java5-src/org/aspectj/lang/annotation/Around.java
new file mode 100644
index 000000000..544ebd427
--- /dev/null
+++ b/aspectj5rt/java5-src/org/aspectj/lang/annotation/Around.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) Jonas Bonér, Alexandre Vasseur
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *******************************************************************************/
+package org.aspectj.lang.annotation;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Around advice
+ *
+ * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
+ */
+@Target(ElementType.METHOD)
+public @interface Around {
+
+ /**
+ * The pointcut expression where to bind the advice
+ */
+ String value();
+}
diff --git a/aspectj5rt/java5-src/org/aspectj/lang/annotation/Aspect.java b/aspectj5rt/java5-src/org/aspectj/lang/annotation/Aspect.java
new file mode 100644
index 000000000..8d2468682
--- /dev/null
+++ b/aspectj5rt/java5-src/org/aspectj/lang/annotation/Aspect.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) Jonas Bonér, Alexandre Vasseur
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *******************************************************************************/
+package org.aspectj.lang.annotation;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Aspect declaration
+ *
+ * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
+ */
+@Target(ElementType.TYPE)
+public @interface Aspect {
+
+ /**
+ * Per clause expression, defaults to singleton aspect
+ * <p/>
+ * Valid values are "" (singleton), "perthis(...)", etc
+ */
+ public String value() default "";
+}
diff --git a/aspectj5rt/java5-src/org/aspectj/lang/annotation/Before.java b/aspectj5rt/java5-src/org/aspectj/lang/annotation/Before.java
new file mode 100644
index 000000000..e9b76fe50
--- /dev/null
+++ b/aspectj5rt/java5-src/org/aspectj/lang/annotation/Before.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) Jonas Bonér, Alexandre Vasseur
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *******************************************************************************/
+package org.aspectj.lang.annotation;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Before advice
+ *
+ * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
+ */
+//FIXME av @AJ annotations RuntimeVisible or RuntimeInvisible? Applies to all annotations in this package
+@Target(ElementType.METHOD)
+public @interface Before {
+
+ /**
+ * The pointcut expression where to bind the advice
+ */
+ String value();
+}
diff --git a/aspectj5rt/java5-src/org/aspectj/lang/annotation/DeclarePrecedence.java b/aspectj5rt/java5-src/org/aspectj/lang/annotation/DeclarePrecedence.java
new file mode 100644
index 000000000..178381065
--- /dev/null
+++ b/aspectj5rt/java5-src/org/aspectj/lang/annotation/DeclarePrecedence.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) Jonas Bonér, Alexandre Vasseur
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *******************************************************************************/
+package org.aspectj.lang.annotation;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Aspect precedence declaration
+ *
+ * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
+ */
+@Target(ElementType.TYPE)
+public @interface DeclarePrecedence {
+
+ /**
+ * The precedence pattern list
+ */
+ String value();
+
+}
diff --git a/aspectj5rt/java5-src/org/aspectj/lang/annotation/Pointcut.java b/aspectj5rt/java5-src/org/aspectj/lang/annotation/Pointcut.java
new file mode 100644
index 000000000..8a4abe6be
--- /dev/null
+++ b/aspectj5rt/java5-src/org/aspectj/lang/annotation/Pointcut.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) Jonas Bonér, Alexandre Vasseur
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *******************************************************************************/
+package org.aspectj.lang.annotation;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Pointcut declaration
+ *
+ * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
+ */
+@Target(ElementType.METHOD)
+public @interface Pointcut {
+
+ /**
+ * The pointcut expression
+ */
+ String value();
+}