Class ConcreteTypeMunger

java.lang.Object
org.aspectj.weaver.ConcreteTypeMunger
All Implemented Interfaces:
PartialOrder.PartialComparable
Direct Known Subclasses:
BcelTypeMunger, TemporaryTypeMunger

public abstract class ConcreteTypeMunger extends Object implements PartialOrder.PartialComparable
  • Field Details

  • Constructor Details

  • Method Details

    • equivalentTo

      public boolean equivalentTo(Object other)
      Equivalence can be true for an EclipseTypeMunger and a BcelTypeMunger that represent the same transformation (just at different points in the pipeline).
    • getMunger

      public ResolvedTypeMunger getMunger()
      returns null for mungers that are used internally, but were not part of a declared thing in source code.
    • getAspectType

      public ResolvedType getAspectType()
    • getSignature

      public ResolvedMember getSignature()
    • getWorld

      public World getWorld()
    • getSourceLocation

      public ISourceLocation getSourceLocation()
    • matches

      public boolean matches(ResolvedType onType)
    • getMatchingSyntheticMember

      public ResolvedMember getMatchingSyntheticMember(Member member)
    • compareTo

      public int compareTo(Object other)
      Specified by:
      compareTo in interface PartialOrder.PartialComparable
      Returns:
      • +1 if this is greater than other
      • -1 if this is less than other
      • 0 if this is not comparable to other
      Note: returning 0 from this method doesn't mean the same thing as returning 0 from java.util.Comparable.compareTo()
    • fallbackCompareTo

      public int fallbackCompareTo(Object other)
      Description copied from interface: PartialOrder.PartialComparable
      This method can provide a deterministic ordering for elements that are strictly not comparable. If you have no need for this, this method can just return 0 whenever called.
      Specified by:
      fallbackCompareTo in interface PartialOrder.PartialComparable
    • isTargetTypeParameterized

      public boolean isTargetTypeParameterized()
      returns true if the ITD target type used type variables, for example I<T>. When they are specified like this, the ITDs 'share' type variables with the generic type. Usually this method is called because we need to know whether to tailor the munger for addition to a particular type. For example:
      
         interface I<T> {}
      
         aspect X implements I<String> {
           List<T> I<T>.foo { return null; }
         }
       
      In this case the munger matches X but it matches with the form List<String> foo() { return null; }
    • parameterizedFor

      public abstract ConcreteTypeMunger parameterizedFor(ResolvedType targetType)
      For an ITD made on a generic type that shares type variables with that target type, this method will tailor the ITD for a particular usage of the generic type - either in its raw or parameterized form.
    • isLateMunger

      public boolean isLateMunger()
    • parameterizeWith

      public abstract ConcreteTypeMunger parameterizeWith(Map<String,​UnresolvedType> parameterizationMap, World world)
    • existsToSupportShadowMunging

      public boolean existsToSupportShadowMunging()
      Some type mungers are created purely to help with the implementation of shadow mungers. For example to support the cflow() pointcut we create a new cflow field in the aspect, and that is added via a BcelCflowCounterFieldAdder. During compilation we need to compare sets of type mungers, and if some only come into existence after the 'shadowy' type things have been processed, we need to ignore them during the comparison. Returning true from this method indicates the type munger exists to support 'shadowy' stuff - and so can be ignored in some comparison.
    • shouldOverwrite

      public boolean shouldOverwrite()