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.

Member.java 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
  3. * 2005 Contributors
  4. * All rights reserved.
  5. * This program and the accompanying materials are made available
  6. * under the terms of the Eclipse Public License v1.0
  7. * which accompanies this distribution and is available at
  8. * http://www.eclipse.org/legal/epl-v10.html
  9. *
  10. * Contributors:
  11. * PARC initial implementation
  12. * AMC extracted as interface
  13. * ******************************************************************/
  14. package org.aspectj.weaver;
  15. import java.util.Collection;
  16. import java.util.Iterator;
  17. public interface Member {
  18. public static final Member[] NONE = new Member[0];
  19. public static final MemberKind METHOD = new MemberKind("METHOD", 1);
  20. public static final MemberKind FIELD = new MemberKind("FIELD", 2);
  21. public static final MemberKind CONSTRUCTOR = new MemberKind("CONSTRUCTOR", 3);
  22. public static final MemberKind STATIC_INITIALIZATION = new MemberKind("STATIC_INITIALIZATION", 4);
  23. public static final MemberKind POINTCUT = new MemberKind("POINTCUT", 5);
  24. public static final MemberKind ADVICE = new MemberKind("ADVICE", 6);
  25. public static final MemberKind HANDLER = new MemberKind("HANDLER", 7);
  26. public static final MemberKind MONITORENTER = new MemberKind("MONITORENTER", 8);
  27. public static final MemberKind MONITOREXIT = new MemberKind("MONITOREXIT", 9);
  28. public static final AnnotationX[][] NO_PARAMETER_ANNOTATIONXS = new AnnotationX[][]{};
  29. public static final ResolvedType[][] NO_PARAMETER_ANNOTATION_TYPES = new ResolvedType[][]{};
  30. public MemberKind getKind();
  31. public ResolvedMember resolve(World world);
  32. public String getName();
  33. public UnresolvedType getDeclaringType();
  34. public AnnotationX[] getAnnotations();
  35. public UnresolvedType getReturnType();
  36. public UnresolvedType getType();
  37. public UnresolvedType getGenericReturnType();
  38. public String[] getParameterNames(World world);
  39. public UnresolvedType[] getParameterTypes();
  40. public UnresolvedType[] getGenericParameterTypes();
  41. /**
  42. * Return full signature, including return type, e.g. "()LFastCar;" for a signature without the return type,
  43. * use getParameterSignature() - it is important to choose the right one in the face of covariance.
  44. */
  45. public String getSignature();
  46. /**
  47. * All the signatures that a join point with this member as its signature has.
  48. */
  49. public Iterator getJoinPointSignatures(World world);
  50. public int getArity();
  51. /**
  52. * Return signature without return type, e.g. "()" for a signature *with* the return type,
  53. * use getSignature() - it is important to choose the right one in the face of covariance.
  54. */
  55. public String getParameterSignature();
  56. public boolean isCompatibleWith(Member am);
  57. public int getModifiers(World world);
  58. public int getModifiers();
  59. public UnresolvedType[] getExceptions(World world);
  60. public boolean isStatic();
  61. public boolean isInterface();
  62. public boolean isPrivate();
  63. public int getCallsiteModifiers();
  64. public String getExtractableName();
  65. // public AnnotationX[] getAnnotations();
  66. public Collection/*ResolvedType*/getDeclaringTypes(World world);
  67. // ---- reflective thisJoinPoint related methods
  68. public String getSignatureMakerName();
  69. public String getSignatureType();
  70. public String getSignatureString(World world);
  71. }