abc.weaving.matching
Class MethodAdviceList

java.lang.Object
  extended by abc.weaving.matching.MethodAdviceList

public class MethodAdviceList
extends java.lang.Object

The lists of AdviceApplication structures applying to a method

Author:
Ganesh Sittampalam, Laurie Hendren

Field Summary
 java.util.List bodyAdvice
          Advice that would apply to the whole body, i.e. at execution joinpoints
 java.util.List bodyAdviceP
           
 java.util.List initializationAdvice
          initialization joinpoints, trigger inlining of this() calls
 java.util.List initializationAdviceP
           
 java.util.List preinitializationAdvice
          pre-initialization joinpoints
 java.util.List preinitializationAdviceP
           
 java.util.List stmtAdvice
          Advice that would apply inside the body, i.e. most other joinpoints
 java.util.List stmtAdviceP
           
 
Constructor Summary
MethodAdviceList()
           
 
Method Summary
 void addBodyAdvice(AdviceApplication aa)
           
 void addInitializationAdvice(AdviceApplication aa)
           
 void addPreinitializationAdvice(AdviceApplication aa)
           
 void addStmtAdvice(AdviceApplication aa)
           
 java.util.List allAdvice()
           
 void debugInfo(java.lang.String prefix, java.lang.StringBuffer sb)
           
 void flush()
          AdviceApplication structures are added to the list for one shadow, then the next etc.
 boolean hasBodyAdvice()
          returns true if there is any body advice
 boolean hasInitializationAdvice()
          returns true if there is any initialization advice
 boolean hasPreinitializationAdvice()
          returns true if there is any preinitialization advice
 boolean hasStmtAdvice()
          returns true if there is any stmt advice
 boolean isEmpty()
          returns true if there is no advice
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bodyAdviceP

public java.util.List bodyAdviceP

stmtAdviceP

public java.util.List stmtAdviceP

preinitializationAdviceP

public java.util.List preinitializationAdviceP

initializationAdviceP

public java.util.List initializationAdviceP

bodyAdvice

public java.util.List bodyAdvice
Advice that would apply to the whole body, i.e. at execution joinpoints


stmtAdvice

public java.util.List stmtAdvice
Advice that would apply inside the body, i.e. most other joinpoints


preinitializationAdvice

public java.util.List preinitializationAdvice
pre-initialization joinpoints


initializationAdvice

public java.util.List initializationAdvice
initialization joinpoints, trigger inlining of this() calls

Constructor Detail

MethodAdviceList

public MethodAdviceList()
Method Detail

flush

public void flush()
AdviceApplication structures are added to the list for one shadow, then the next etc. At each shadow, they need to be sorted in precedence order, so we sort them as they are added. This method should be called after each shadow to add the sorted list for that shadow to the main list for the method.


addBodyAdvice

public void addBodyAdvice(AdviceApplication aa)

addStmtAdvice

public void addStmtAdvice(AdviceApplication aa)

addPreinitializationAdvice

public void addPreinitializationAdvice(AdviceApplication aa)

addInitializationAdvice

public void addInitializationAdvice(AdviceApplication aa)

isEmpty

public boolean isEmpty()
returns true if there is no advice


hasBodyAdvice

public boolean hasBodyAdvice()
returns true if there is any body advice


hasStmtAdvice

public boolean hasStmtAdvice()
returns true if there is any stmt advice


hasInitializationAdvice

public boolean hasInitializationAdvice()
returns true if there is any initialization advice


hasPreinitializationAdvice

public boolean hasPreinitializationAdvice()
returns true if there is any preinitialization advice


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

debugInfo

public void debugInfo(java.lang.String prefix,
                      java.lang.StringBuffer sb)

allAdvice

public java.util.List allAdvice()