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.

ResolvedMember.java 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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.io.IOException;
  16. import java.util.List;
  17. import java.util.Map;
  18. import org.aspectj.bridge.ISourceLocation;
  19. public interface ResolvedMember extends Member, AnnotatedElement, TypeVariableDeclaringElement {
  20. ResolvedMember[] NONE = new ResolvedMember[0];
  21. int getModifiers(World world);
  22. int getModifiers();
  23. UnresolvedType[] getExceptions(World world);
  24. UnresolvedType[] getExceptions();
  25. ShadowMunger getAssociatedShadowMunger();
  26. boolean isAjSynthetic();
  27. boolean isCompatibleWith(Member am);
  28. boolean hasAnnotation(UnresolvedType ofType);
  29. AnnotationAJ[] getAnnotations();
  30. ResolvedType[] getAnnotationTypes();
  31. void setAnnotationTypes(ResolvedType[] annotationtypes);
  32. void addAnnotation(AnnotationAJ annotation);
  33. boolean isBridgeMethod();
  34. boolean isVarargsMethod();
  35. boolean isSynthetic();
  36. void write(CompressingDataOutputStream s) throws IOException;
  37. ISourceContext getSourceContext(World world);
  38. String[] getParameterNames();
  39. void setParameterNames(String[] names);
  40. AnnotationAJ[][] getParameterAnnotations();
  41. ResolvedType[][] getParameterAnnotationTypes();
  42. String getAnnotationDefaultValue();
  43. String getParameterSignatureErased();
  44. String getSignatureErased();
  45. String[] getParameterNames(World world);
  46. AjAttribute.EffectiveSignatureAttribute getEffectiveSignature();
  47. ISourceLocation getSourceLocation();
  48. int getStart();
  49. int getEnd();
  50. ISourceContext getSourceContext();
  51. void setPosition(int sourceStart, int sourceEnd);
  52. void setSourceContext(ISourceContext sourceContext);
  53. boolean isAbstract();
  54. boolean isPublic();
  55. boolean isDefault();
  56. boolean isVisible(ResolvedType fromType);
  57. void setCheckedExceptions(UnresolvedType[] checkedExceptions);
  58. void setAnnotatedElsewhere(boolean b);
  59. boolean isAnnotatedElsewhere();
  60. // like toString but include generic signature info
  61. String toGenericString();
  62. String toDebugString();
  63. boolean hasBackingGenericMember();
  64. ResolvedMember getBackingGenericMember();
  65. /**
  66. * Get the UnresolvedType for the return type, taking generic signature into account
  67. */
  68. UnresolvedType getGenericReturnType();
  69. /**
  70. * Get the TypeXs of the parameter types, taking generic signature into account
  71. */
  72. UnresolvedType[] getGenericParameterTypes();
  73. boolean equalsApartFromDeclaringType(Object other);
  74. // return a resolved member in which all type variables in the signature of
  75. // this member have been replaced with the given bindings. the isParameterized flag tells us whether we are creating a raw type
  76. // version or not
  77. // if isParameterized List<T> will turn into List<String> (for example),
  78. // but if !isParameterized List<T> will turn into List.
  79. ResolvedMemberImpl parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType,
  80. boolean isParameterized);
  81. // this variant allows for aliases for type variables (i.e. allowing them to
  82. // have another name)
  83. // this is used for processing ITDs that share type variables with their
  84. // target generic type
  85. ResolvedMemberImpl parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType,
  86. boolean isParameterized, List<String> aliases);
  87. void setTypeVariables(TypeVariable[] types);
  88. TypeVariable[] getTypeVariables();
  89. /**
  90. * Returns true if this member matches the other. The matching takes into account name and parameter types only. When comparing
  91. * parameter types, we allow any type variable to match any other type variable regardless of bounds.
  92. */
  93. boolean matches(ResolvedMember aCandidateMatch, boolean ignoreGenerics);
  94. void evictWeavingState();
  95. ResolvedMember parameterizedWith(Map<String, UnresolvedType> m, World w);
  96. boolean isDefaultConstructor();
  97. void setAnnotations(AnnotationAJ[] annotations);
  98. }