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.7KB

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. public static final ResolvedMember[] NONE = new ResolvedMember[0];
  21. public int getModifiers(World world);
  22. public int getModifiers();
  23. public UnresolvedType[] getExceptions(World world);
  24. public UnresolvedType[] getExceptions();
  25. public ShadowMunger getAssociatedShadowMunger();
  26. public boolean isAjSynthetic();
  27. public boolean isCompatibleWith(Member am);
  28. public boolean hasAnnotation(UnresolvedType ofType);
  29. public AnnotationAJ[] getAnnotations();
  30. public ResolvedType[] getAnnotationTypes();
  31. public void setAnnotationTypes(ResolvedType[] annotationtypes);
  32. public void addAnnotation(AnnotationAJ annotation);
  33. public boolean isBridgeMethod();
  34. public boolean isVarargsMethod();
  35. public boolean isSynthetic();
  36. public void write(CompressingDataOutputStream s) throws IOException;
  37. public ISourceContext getSourceContext(World world);
  38. public String[] getParameterNames();
  39. public void setParameterNames(String[] names);
  40. public AnnotationAJ[][] getParameterAnnotations();
  41. public ResolvedType[][] getParameterAnnotationTypes();
  42. public String getAnnotationDefaultValue();
  43. public String getParameterSignatureErased();
  44. public String getSignatureErased();
  45. public String[] getParameterNames(World world);
  46. public AjAttribute.EffectiveSignatureAttribute getEffectiveSignature();
  47. public ISourceLocation getSourceLocation();
  48. public int getStart();
  49. public int getEnd();
  50. public ISourceContext getSourceContext();
  51. public void setPosition(int sourceStart, int sourceEnd);
  52. public void setSourceContext(ISourceContext sourceContext);
  53. public boolean isAbstract();
  54. public boolean isPublic();
  55. public boolean isDefault();
  56. public boolean isVisible(ResolvedType fromType);
  57. public void setCheckedExceptions(UnresolvedType[] checkedExceptions);
  58. public void setAnnotatedElsewhere(boolean b);
  59. public boolean isAnnotatedElsewhere();
  60. // like toString but include generic signature info
  61. public String toGenericString();
  62. public String toDebugString();
  63. public boolean hasBackingGenericMember();
  64. public ResolvedMember getBackingGenericMember();
  65. /**
  66. * Get the UnresolvedType for the return type, taking generic signature into account
  67. */
  68. public UnresolvedType getGenericReturnType();
  69. /**
  70. * Get the TypeXs of the parameter types, taking generic signature into account
  71. */
  72. public UnresolvedType[] getGenericParameterTypes();
  73. public 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. public 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. public ResolvedMemberImpl parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType,
  86. boolean isParameterized, List<String> aliases);
  87. public void setTypeVariables(TypeVariable[] types);
  88. public 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. public boolean matches(ResolvedMember aCandidateMatch, boolean ignoreGenerics);
  94. public void evictWeavingState();
  95. public ResolvedMember parameterizedWith(Map<String, UnresolvedType> m, World w);
  96. public boolean isDefaultConstructor();
  97. public void setAnnotations(AnnotationAJ[] annotations);
  98. }