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.

DeclareAnnotation.java 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. * Adrian Colyer Initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.lang.reflect;
  13. import java.lang.annotation.Annotation;
  14. /**
  15. * The AspectJ runtime representation of a declare annotation member in an aspect.
  16. *
  17. */
  18. public interface DeclareAnnotation {
  19. public enum Kind { Field, Method, Constructor, Type };
  20. /**
  21. * The aspect that declared this member.
  22. */
  23. AjType<?> getDeclaringType();
  24. /**
  25. * The target element kind
  26. */
  27. Kind getKind();
  28. /**
  29. * The target signature pattern. Returns null if getKind() == Type
  30. */
  31. SignaturePattern getSignaturePattern();
  32. /**
  33. * The target type pattern. Returns null if getKind() != Type
  34. */
  35. TypePattern getTypePattern();
  36. /**
  37. * The declared annotation. If the declared annotation does not have runtime retention,
  38. * this method returns null.
  39. */
  40. Annotation getAnnotation();
  41. /**
  42. * Returns the text of the annotation as declared in this member. Available for
  43. * both runtime and class-file retention annotations
  44. */
  45. String getAnnotationAsText();
  46. }