Klasse ShadowMunger

java.lang.Object
org.aspectj.weaver.ShadowMunger
Alle implementierten Schnittstellen:
PartialOrder.PartialComparable, IHasPosition
Bekannte direkte Unterklassen:
Advice, Checker

public abstract class ShadowMunger extends Object implements PartialOrder.PartialComparable, IHasPosition
For every shadow munger, nothing can be done with it until it is concretized. Then... (Then we call fast match.) For every shadow munger, for every shadow, first match is called, then (if match returned true) the shadow munger is specialized for the shadow, which may modify state. Then implement is called.
  • Felddetails

    • NONE

      public static final ShadowMunger[] NONE
    • ShadowMungerAdvice

      protected static final int ShadowMungerAdvice
      Siehe auch:
    • ShadowMungerDeow

      protected static final int ShadowMungerDeow
      Siehe auch:
    • handle

      public String handle
    • start

      protected int start
    • end

      protected int end
    • sourceContext

      protected ISourceContext sourceContext
    • pointcut

      protected Pointcut pointcut
  • Konstruktordetails

    • ShadowMunger

      protected ShadowMunger()
    • ShadowMunger

      public ShadowMunger(Pointcut pointcut, int start, int end, ISourceContext sourceContext, int shadowMungerKind)
  • Methodendetails

    • match

      public boolean match(Shadow shadow, World world)
      All overriding methods should call super
    • fallbackCompareTo

      public int fallbackCompareTo(Object other)
      Beschreibung aus Schnittstelle kopiert: 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.
      Angegeben von:
      fallbackCompareTo in Schnittstelle PartialOrder.PartialComparable
    • getEnd

      public int getEnd()
      Beschreibung aus Schnittstelle kopiert: IHasPosition
      The ending index of this location in the character stream This points to the last character in this token. If a location truly had no contents, then start == end + 1. We don't recommend this.
      Angegeben von:
      getEnd in Schnittstelle IHasPosition
    • getStart

      public int getStart()
      Beschreibung aus Schnittstelle kopiert: IHasPosition
      The starting index of this location in the character stream.
      Angegeben von:
      getStart in Schnittstelle IHasPosition
    • getSourceLocation

      public ISourceLocation getSourceLocation()
    • getPointcut

      public Pointcut getPointcut()
    • setPointcut

      public void setPointcut(Pointcut pointcut)
    • setDeclaringType

      public void setDeclaringType(ResolvedType aType)
      Invoked when the shadow munger of a resolved type are processed.
      Parameter:
      aType -
    • getDeclaringType

      public ResolvedType getDeclaringType()
    • getConcreteAspect

      public abstract ResolvedType getConcreteAspect()
    • getBinarySourceLocation

      public ISourceLocation getBinarySourceLocation(ISourceLocation sl)
      Returns the binarySourceLocation for the given sourcelocation. This isn't cached because it's used when faulting in the binary nodes and is called with ISourceLocations for all advice, pointcuts and deows contained within the resolvedDeclaringAspect.
    • isBinary

      public boolean isBinary()
      Returns whether or not this shadow munger came from a binary aspect - keep a record of whether or not we've checked if we're binary otherwise we keep calculating the same thing many times
    • concretize

      public abstract ShadowMunger concretize(ResolvedType fromType, World world, PerClause clause)
    • specializeOn

      public abstract void specializeOn(Shadow shadow)
    • implementOn

      public abstract boolean implementOn(Shadow shadow)
      Implement this munger at the specified shadow, returning a boolean to indicate success.
      Parameter:
      shadow - the shadow where this munger should be applied
      Gibt zurück:
      true if the implement was successful
    • parameterizeWith

      public abstract ShadowMunger parameterizeWith(ResolvedType declaringType, Map<String,UnresolvedType> typeVariableMap)
    • getThrownExceptions

      public abstract Collection<ResolvedType> getThrownExceptions()
      Gibt zurück:
      a Collection of ResolvedTypes for all checked exceptions that might be thrown by this munger
    • mustCheckExceptions

      public abstract boolean mustCheckExceptions()
      Does the munger have to check that its exception are accepted by the shadow ? It is not the case for annotation style around advice, for example: that can throw Throwable, even if the advised method does not throw any exceptions.
      Gibt zurück:
      true if munger has to check that its exceptions can be thrown based on the shadow
    • write

      public void write(CompressingDataOutputStream stream) throws IOException
      Löst aus:
      IOException
    • bindsProceedingJoinPoint

      public boolean bindsProceedingJoinPoint()
    • isAroundAdvice

      public boolean isAroundAdvice()