Browse Source

@AJ annotations

AspectJ5_Development
avasseur 19 years ago
parent
commit
badcbd5c91

+ 25
- 0
aspectj5rt/java5-src/org/aspectj/lang/annotation/After.java View File

@@ -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();
}

+ 35
- 0
aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterReturning.java View File

@@ -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 "";
}

+ 35
- 0
aspectj5rt/java5-src/org/aspectj/lang/annotation/AfterThrowing.java View File

@@ -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 "";
}

+ 25
- 0
aspectj5rt/java5-src/org/aspectj/lang/annotation/Around.java View File

@@ -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();
}

+ 27
- 0
aspectj5rt/java5-src/org/aspectj/lang/annotation/Aspect.java View File

@@ -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 "";
}

+ 26
- 0
aspectj5rt/java5-src/org/aspectj/lang/annotation/Before.java View File

@@ -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 @AJ RV or RIV for @AJ
@Target(ElementType.METHOD)
public @interface Before {

/**
* The pointcut expression where to bind the advice
*/
String value();
}

+ 26
- 0
aspectj5rt/java5-src/org/aspectj/lang/annotation/DeclarePrecedence.java View File

@@ -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();

}

+ 25
- 0
aspectj5rt/java5-src/org/aspectj/lang/annotation/Pointcut.java View File

@@ -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();
}

Loading…
Cancel
Save