abc.tm.ast
Class PerEventAdviceDecl_c

java.lang.Object
  extended by MethodDecl_c
      extended by abc.aspectj.extension.AJMethodDecl_c
          extended by abc.aspectj.ast.AdviceBody_c
              extended by abc.tm.ast.PerEventAdviceDecl_c
All Implemented Interfaces:
AdviceDecl, MakesAspectMethods, ContainsAspectInfo, TransformsAspectReflection, TMAdviceDecl

public class PerEventAdviceDecl_c
extends AdviceBody_c
implements TMAdviceDecl

Author:
Julian Tibble This class is for compiler-generated advice for tracematches, where the advice is executed once for each event (that is, any joinpoint where at least one symbol matches). Since symbols can match before and after joinpoints, this advice is passed two pointcuts - one for before, and one for after. One of these pointcuts can be null, but not both, and they cannot have any free pointcut variables.

Field Summary
protected  Pointcut after_pc
           
protected  AdviceSpec after_spec
           
protected  Pointcut before_pc
           
protected  AdviceSpec before_spec
           
protected  int kind
           
protected  java.lang.String tm_id
           
protected  Position tm_pos
           
 
Fields inherited from class abc.aspectj.ast.AdviceBody_c
canRewriteThisJoinPoint, hasEnclosingJoinPointStaticPart, hasJoinPoint, hasJoinPointStaticPart, isAroundAdvice, methodsInAdvice, thisEnclosingJoinPointStaticPartInstance, thisJoinPointInstance, thisJoinPointStaticPartInstance
 
Fields inherited from interface abc.tm.ast.TMAdviceDecl
BODY, OTHER, SOME, SYNCH
 
Constructor Summary
PerEventAdviceDecl_c(Position pos, Flags flags, AdviceSpec before_spec, Pointcut before_pc, AdviceSpec after_spec, Pointcut after_pc, Block body, java.lang.String tm_id, Position tm_pos, int kind)
           
 
Method Summary
protected  java.lang.String adviceSignature()
           
 NodeVisitor disambiguateEnter(AmbiguityRemover ar)
           
 void prettyPrint(CodeWriter w, PrettyPrinter tr)
           
protected  PerEventAdviceDecl_c reconstruct(TypeNode returnType, java.util.List formals, java.util.List throwTypes, Pointcut before_pc, Pointcut after_pc, Block body)
           
 Node typeCheck(TypeChecker tc)
          Type check the advice: first the usual method checks, then pointcut checks.
 void update(GlobalAspectInfo gai, Aspect current_aspect)
          Called by the AspectInfoHarvester to tell the node to put all relevant information into the GlobalAspectInfo.
 Node visitChildren(NodeVisitor v)
           
 
Methods inherited from class abc.aspectj.ast.AdviceBody_c
addExtraFormals, aspectMethodsEnter, aspectMethodsLeave, buildTypes, dummyVal, enterAspectReflectionInspect, enterAspectReflectionRewrite, enterScope, enterScope, entry, hasEnclosingJoinPointStaticPart, hasJoinPoint, hasJoinPointStaticPart, joinpointFormals, leaveAspectReflectionInspect, leaveAspectReflectionRewrite, localMethod, makeMethodInstance, methodDecl, proceedDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface abc.aspectj.ast.AdviceDecl
hasJoinPoint, hasJoinPointStaticPart, joinpointFormals, localMethod, methodDecl, proceedDecl
 
Methods inherited from interface abc.aspectj.ast.MakesAspectMethods
aspectMethodsEnter, aspectMethodsLeave
 
Methods inherited from interface abc.aspectj.visit.TransformsAspectReflection
enterAspectReflectionInspect, enterAspectReflectionRewrite, leaveAspectReflectionInspect, leaveAspectReflectionRewrite
 

Field Detail

kind

protected int kind

tm_id

protected java.lang.String tm_id

tm_pos

protected Position tm_pos

before_spec

protected AdviceSpec before_spec

before_pc

protected Pointcut before_pc

after_spec

protected AdviceSpec after_spec

after_pc

protected Pointcut after_pc
Constructor Detail

PerEventAdviceDecl_c

public PerEventAdviceDecl_c(Position pos,
                            Flags flags,
                            AdviceSpec before_spec,
                            Pointcut before_pc,
                            AdviceSpec after_spec,
                            Pointcut after_pc,
                            Block body,
                            java.lang.String tm_id,
                            Position tm_pos,
                            int kind)
Method Detail

reconstruct

protected PerEventAdviceDecl_c reconstruct(TypeNode returnType,
                                           java.util.List formals,
                                           java.util.List throwTypes,
                                           Pointcut before_pc,
                                           Pointcut after_pc,
                                           Block body)

visitChildren

public Node visitChildren(NodeVisitor v)

disambiguateEnter

public NodeVisitor disambiguateEnter(AmbiguityRemover ar)
                              throws SemanticException
Overrides:
disambiguateEnter in class AdviceBody_c
Throws:
SemanticException

adviceSignature

protected java.lang.String adviceSignature()
Specified by:
adviceSignature in class AdviceBody_c

typeCheck

public Node typeCheck(TypeChecker tc)
               throws SemanticException
Type check the advice: first the usual method checks, then pointcut checks.

Overrides:
typeCheck in class AdviceBody_c
Throws:
SemanticException

prettyPrint

public void prettyPrint(CodeWriter w,
                        PrettyPrinter tr)
Specified by:
prettyPrint in class AdviceBody_c

update

public void update(GlobalAspectInfo gai,
                   Aspect current_aspect)
Description copied from interface: ContainsAspectInfo
Called by the AspectInfoHarvester to tell the node to put all relevant information into the GlobalAspectInfo.

Specified by:
update in interface ContainsAspectInfo
Parameters:
gai - the target of the information.
current_aspect - the aspect currently being traversed.