abc.weaving.matching
Class ShadowMatch

java.lang.Object
  extended by abc.weaving.matching.ShadowMatch
Direct Known Subclasses:
BodyShadowMatch, StmtShadowMatch

public abstract class ShadowMatch
extends java.lang.Object

A specific join point shadow

Author:
Ganesh Sittampalam, Ondrej Lhotak

Field Summary
protected  SootMethod container
           
 ShadowPoints sp
          The ShadowPoints of a specific shadow match are the nop statements that are inserted to make weaving easier.
 
Constructor Summary
protected ShadowMatch(SootMethod container)
           
 
Method Summary
 void addAdviceApplication(MethodAdviceList mal, AbstractAdviceDecl ad, Residue residue)
          Add a new advice application to the appropriate bit of a method advice list
 void addIfNecessary()
           
protected abstract  AdviceApplication doAddAdviceApplication(MethodAdviceList mal, AbstractAdviceDecl ad, Residue residue)
           
 java.util.List getArgsContextValues()
          Return a list of ContextValue that represent the runtime values that could be bound by an args() pointcut
 SootMethod getContainer()
          return the method that this ShadowMatch occurs within
abstract  ShadowMatch getEnclosing()
          return the enclosing ShadowMatch
 java.util.List getExceptions()
          The list of exceptions that this shadow is declared to throw
abstract  Host getHost()
          Get the host that this ShadowMatch corresponds to, for positional information
 ContextValue getReturningContextValue()
          Return a ContextValue that represents the runtime value that is bound by after returning() advice
 SJPInfo getSJPInfo()
          Retrieve the sjpInfo structure, creating it if necessary
abstract  ContextValue getTargetContextValue()
          Return a ContextValue that represents the runtime value that is bound by a target() pointcut
 ContextValue getThisContextValue()
          Return a ContextValue that represents the runtime value that is bound by a this() pointcut
abstract  ShadowMatch inline(ConstructorInliningMap cim)
           
abstract  java.lang.String joinpointName()
           
protected abstract  SJPInfo makeSJPInfo()
          Construct the sjpInfo structure
 void recordSJPInfo()
          Construct the sjpInfo structure and register it with the global list in GlobalAspectInfo, unless this has already been done
 void setShadowPoints(ShadowPoints sp)
          This method is called by the ShadowPointsSetter to set the ShadowPoints for this shadow
 boolean supportsAfter()
          Does this shadow support after advice?
 boolean supportsAround()
          Does this shadow support around advice?
 boolean supportsBefore()
          Does this shadow support before advice?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

protected SootMethod container

sp

public ShadowPoints sp
The ShadowPoints of a specific shadow match are the nop statements that are inserted to make weaving easier. They are set by the ShadowPointsSetter

Constructor Detail

ShadowMatch

protected ShadowMatch(SootMethod container)
Method Detail

inline

public abstract ShadowMatch inline(ConstructorInliningMap cim)

getEnclosing

public abstract ShadowMatch getEnclosing()
return the enclosing ShadowMatch


getContainer

public SootMethod getContainer()
return the method that this ShadowMatch occurs within


getHost

public abstract Host getHost()
Get the host that this ShadowMatch corresponds to, for positional information


makeSJPInfo

protected abstract SJPInfo makeSJPInfo()
Construct the sjpInfo structure


recordSJPInfo

public final void recordSJPInfo()
Construct the sjpInfo structure and register it with the global list in GlobalAspectInfo, unless this has already been done


getSJPInfo

public final SJPInfo getSJPInfo()
Retrieve the sjpInfo structure, creating it if necessary


addAdviceApplication

public void addAdviceApplication(MethodAdviceList mal,
                                 AbstractAdviceDecl ad,
                                 Residue residue)
Add a new advice application to the appropriate bit of a method advice list


addIfNecessary

public void addIfNecessary()

doAddAdviceApplication

protected abstract AdviceApplication doAddAdviceApplication(MethodAdviceList mal,
                                                            AbstractAdviceDecl ad,
                                                            Residue residue)

getThisContextValue

public ContextValue getThisContextValue()
Return a ContextValue that represents the runtime value that is bound by a this() pointcut


getTargetContextValue

public abstract ContextValue getTargetContextValue()
Return a ContextValue that represents the runtime value that is bound by a target() pointcut


getArgsContextValues

public java.util.List getArgsContextValues()
Return a list of ContextValue that represent the runtime values that could be bound by an args() pointcut


getReturningContextValue

public ContextValue getReturningContextValue()
Return a ContextValue that represents the runtime value that is bound by after returning() advice


supportsBefore

public boolean supportsBefore()
Does this shadow support before advice?


supportsAfter

public boolean supportsAfter()
Does this shadow support after advice?


supportsAround

public boolean supportsAround()
Does this shadow support around advice?


getExceptions

public java.util.List getExceptions()
The list of exceptions that this shadow is declared to throw


setShadowPoints

public void setShadowPoints(ShadowPoints sp)
This method is called by the ShadowPointsSetter to set the ShadowPoints for this shadow


joinpointName

public abstract java.lang.String joinpointName()