You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Before.java 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*******************************************************************************
  2. * Copyright (c) 2005 Contributors.
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://eclipse.org/legal/epl-v10.html
  8. *
  9. * Contributors:
  10. * initial implementation Alexandre Vasseur
  11. *******************************************************************************/
  12. package org.aspectj.lang.annotation;
  13. import java.lang.annotation.Target;
  14. import java.lang.annotation.ElementType;
  15. import java.lang.annotation.Retention;
  16. import java.lang.annotation.RetentionPolicy;
  17. /**
  18. * Before advice
  19. *
  20. * @author Alexandre Vasseur
  21. */
  22. @Retention(RetentionPolicy.RUNTIME)
  23. @Target(ElementType.METHOD)
  24. public @interface Before {
  25. /**
  26. * @return the pointcut expression where to bind the advice
  27. */
  28. String value();
  29. /**
  30. * When compiling without debug info, or when interpreting pointcuts at runtime,
  31. * the names of any arguments used in the advice declaration are not available.
  32. * Under these circumstances only, it is necessary to provide the arg names in
  33. * the annotation - these MUST duplicate the names used in the annotated method.
  34. * Format is a simple comma-separated list.
  35. *
  36. * @return the argument names (should match the annotated method parameter names)
  37. */
  38. String argNames() default "";
  39. }