abc.ra.ast
Class RelAdviceDecl_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.aspectj.ast.AdviceDecl_c
                  extended by abc.ra.ast.AdviceDecl_c
                      extended by abc.ra.ast.RelAdviceDecl_c
All Implemented Interfaces:
AdviceDecl, MakesAspectMethods, ContainsAspectInfo, TransformsAspectReflection, RelAdviceDecl

public class RelAdviceDecl_c
extends AdviceDecl_c
implements RelAdviceDecl

Declaration of a relational advice. This node type only exists for parsing and type checking. It is rewritten into a RelAdviceTMDecl_c right after parsing.

Author:
Eric Bodden

Field Summary
 
Fields inherited from class abc.aspectj.ast.AdviceDecl_c
pc, retval, spec
 
Fields inherited from class abc.aspectj.ast.AdviceBody_c
canRewriteThisJoinPoint, hasEnclosingJoinPointStaticPart, hasJoinPoint, hasJoinPointStaticPart, isAroundAdvice, methodsInAdvice, thisEnclosingJoinPointStaticPartInstance, thisJoinPointInstance, thisJoinPointStaticPartInstance
 
Constructor Summary
RelAdviceDecl_c(Position pos, Flags flags, AdviceSpec spec, java.util.List throwTypes, Pointcut pc, Block body)
          Creates a new relational advice declaration.
 
Method Summary
 TMDecl genTraceMatch(RelAspectDecl container, RANodeFactory nf, TypeSystem ts)
          Generates a tracematch declaration equivalent to this relational aspect declaration.
 Node typeCheck(TypeChecker tc)
          Typechecks this relational advice.
 
Methods inherited from class abc.aspectj.ast.AdviceDecl_c
acceptCFG, addExtraFormals, adviceSignature, disambiguateEnter, enterScope, entry, prettyPrint, proceedDecl, reconstruct, update, visitChildren
 
Methods inherited from class abc.aspectj.ast.AdviceBody_c
aspectMethodsEnter, aspectMethodsLeave, buildTypes, dummyVal, enterAspectReflectionInspect, enterAspectReflectionRewrite, enterScope, hasEnclosingJoinPointStaticPart, hasJoinPoint, hasJoinPointStaticPart, joinpointFormals, leaveAspectReflectionInspect, leaveAspectReflectionRewrite, localMethod, makeMethodInstance, methodDecl
 
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
 

Constructor Detail

RelAdviceDecl_c

public RelAdviceDecl_c(Position pos,
                       Flags flags,
                       AdviceSpec spec,
                       java.util.List throwTypes,
                       Pointcut pc,
                       Block body)
Creates a new relational advice declaration.

Parameters:
pos - position of this AST node
flags - modifier of the advice
spec - advice spec
throwTypes - list of throw types
pc - pointcut for this advice
body - advice body
Method Detail

typeCheck

public Node typeCheck(TypeChecker tc)
               throws SemanticException
Typechecks this relational advice. The advice may only be contained in a relational aspect. Also, it may not declare any advice formals that have the same name as any of the relational aspect formals. If after returning/throwing, the same is true for the return variable. Further we check that this relational advice decl is contained in a relational aspect.

Overrides:
typeCheck in class AdviceDecl_c
Throws:
SemanticException

genTraceMatch

public TMDecl genTraceMatch(RelAspectDecl container,
                            RANodeFactory nf,
                            TypeSystem ts)
Generates a tracematch declaration equivalent to this relational aspect declaration.

Specified by:
genTraceMatch in interface RelAdviceDecl
Parameters:
container - the relational aspect containing this advice
nf - the node factory
ts - the type system
Returns:
the equivalent tracematch declaration