Klasse InterTypeDeclaration

Alle implementierten Schnittstellen:
ReferenceContext, TypeConstants, TypeIds, ProblemSeverities
Bekannte direkte Unterklassen:
InterTypeConstructorDeclaration, InterTypeFieldDeclaration, InterTypeMethodDeclaration

public abstract class InterTypeDeclaration extends AjMethodDeclaration
Base type for all inter-type declarations including methods, fields and constructors.
Autor:
Jim Hugunin
  • Felddetails

    • onType

      protected TypeReference onType
    • onTypeBinding

      protected ReferenceBinding onTypeBinding
    • munger

      protected ResolvedTypeMunger munger
    • declaredModifiers

      public int declaredModifiers
    • declaredSelector

      protected char[] declaredSelector
    • typeVariableAliases

      protected List<String> typeVariableAliases
      If targetting a generic type and wanting to use its type variables, an ITD can use an alternative name for them. This is a list of strings representing the alternative names - the position in the list is used to match it to the real type variable in the target generic type.
    • interTypeScope

      protected InterTypeScope interTypeScope
  • Konstruktordetails

  • Methodendetails

    • setOnType

      public void setOnType(TypeReference onType)
    • setDeclaredModifiers

      public void setDeclaredModifiers(int modifiers)
    • setSelector

      public void setSelector(char[] selector)
    • getPrefix

      protected abstract char[] getPrefix()
    • addAtAspectJAnnotations

      public void addAtAspectJAnnotations()
    • isTargetAnnotation

      public boolean isTargetAnnotation(ClassScope classScope, String kind)
      Checks that the target for the ITD is not an annotation. If it is, an error message is signaled. We return true if it is annotation so the caller knows to stop processing. kind is 'constructor', 'field', 'method'
    • isTargetEnum

      public boolean isTargetEnum(ClassScope classScope, String kind)
      Checks that the target for the ITD is not an enum. If it is, an error message is signaled. We return true if it is enum so the caller knows to stop processing.
    • resolve

      public void resolve(ClassScope upperScope)
      Setzt außer Kraft:
      resolve in Klasse AbstractMethodDeclaration
    • build

      public abstract EclipseTypeMunger build(ClassScope classScope)
      Called from AspectDeclarations.buildInterTypeAndPerClause
    • fixSuperCallsInBody

      public void fixSuperCallsInBody()
    • resolveOnType

      protected void resolveOnType(ClassScope classScope)
    • checkSpec

      protected void checkSpec()
    • makeEffectiveSignatureAttribute

      protected List makeEffectiveSignatureAttribute(ResolvedMember sig, Shadow.Kind kind, boolean weaveBody)
    • setMunger

      protected void setMunger(ResolvedTypeMunger munger)
    • generateInfoAttributes

      protected int generateInfoAttributes(ClassFile classFile)
      Beschreibung aus Klasse kopiert: AbstractMethodDeclaration
      Generates my info attributes, hook for subclasses
      Setzt außer Kraft:
      generateInfoAttributes in Klasse AjMethodDeclaration
    • getShadowKindForBody

      protected abstract Shadow.Kind getShadowKindForBody()
    • getSignature

      public ResolvedMember getSignature()
    • getDeclaredSelector

      public char[] getDeclaredSelector()
    • getOnType

      public TypeReference getOnType()
    • determineTypeVariableAliases

      public void determineTypeVariableAliases()
      Create the list of aliases based on what was supplied as parameters for the ontype. For example, if the declaration is 'List<N> SomeType<N>.foo' then the alias list will simply contain 'N' and 'N' will mean 'the first type variable declared for type SomeType'
    • ensureScopeSetup

      public void ensureScopeSetup()
      Called just before the compiler is going to start resolving elements of a declaration, this method adds an intertypescope between the methodscope and classscope so that elements of the type targetted by the ITD can be resolved. For example, if type variables are referred to in the ontype for the ITD, they have to be resolved against the ontype, not the aspect containing the ITD.
      Setzt außer Kraft:
      ensureScopeSetup in Klasse AbstractMethodDeclaration