abc.aspectj.types
Class AJContext_c

java.lang.Object
  extended by Context_c
      extended by abc.aspectj.types.AJContext_c
All Implemented Interfaces:
AJContext

public class AJContext_c
extends Context_c
implements AJContext

Author:
Oege de Moor

Field Summary
protected  java.util.Collection cflowMustBind
           
protected  AspectType currentAspect
           
protected  boolean declaredStatic
           
protected  AJContext_c endHostScope
           
protected  ClassType fakeType
           
protected  ClassType host
           
protected  boolean inCflow
           
protected  boolean indeclare
           
protected  boolean inIf
           
protected  boolean isAdvice
           
protected  boolean isAround
           
protected  boolean isfake
           
protected  boolean nested
           
protected  MethodInstance proceed
           
protected  AJContext_c startHostScope
           
 
Constructor Summary
AJContext_c(TypeSystem ts)
           
 
Method Summary
 AJContext addITMembers(ReferenceType type)
          add all the members from the intertype host that are accessible
 void addProceed(MethodInstance mi)
           
 AspectType currentAspect()
          Get enclosing aspect, or null
 AJContext endHostScope()
           
 boolean explicitlyStatic()
          was the ITD itself declared static?
 ClassType findFieldScopeInHost(java.lang.String name)
          Finds the class which added a field to the scope.
 Named findInThisScope(java.lang.String name)
           
 MethodInstance findMethod(java.lang.String name, java.util.List argTypes)
          Looks up a method with name "name" and arguments compatible with "argTypes".
 ClassType findMethodContainerInThisScope(java.lang.String name)
           
 ClassType findMethodScope(java.lang.String name)
          Finds the class which added a method to the scope.
 ClassType findMethodScopeInHost(java.lang.String name)
          Finds the class which added a method to the host scope.
 ClassType findPointcutScope(java.lang.String name)
          pointcut lookup
 VarInstance findVariableInThisScope(java.lang.String name)
           
 ClassType getAspect()
           
 java.util.Collection getCflowMustBind()
          get the names of variables that are bound in the smallest enclosing cflow
 ClassType hostClass()
           
 boolean inAdvice()
           
 boolean inCflow()
          inside a cflow?
 boolean inDeclare()
          are we in a declare decl?
 boolean inIf()
          inside an if pointcut?
 boolean inInterType()
          in scope of an intertype decl?
 boolean methodInHost(java.lang.String name)
          was a method by this name introduced via the host?
 boolean nested()
          inner class inside intertype decl?
 MethodInstance proceedInstance()
           
protected  Context_c push()
           
 AJContext pushAdvice(boolean isAround)
           
 Context pushAspect(AspectType type)
           
 AJContext pushCflow(java.util.Collection mustBind)
          mark entry of cflow pointcut expr
 Context pushClass(ParsedClassType c, ClassType t)
           
 AJContext pushDeclare()
          enter a declare warning/error declaration
 Context pushHost(ClassType t, boolean declaredStatic)
          enter an intertype decl
 AJContext pushIf()
          mark entry of if pointcut expr
 Context pushStatic()
           
 AJContext startHostScope()
           
protected  ClassType type()
           
 boolean varInHost(java.lang.String name)
          was a field of this name introduced via the host?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

protected ClassType host

nested

protected boolean nested

declaredStatic

protected boolean declaredStatic

startHostScope

protected AJContext_c startHostScope

endHostScope

protected AJContext_c endHostScope

fakeType

protected ClassType fakeType

isfake

protected boolean isfake

indeclare

protected boolean indeclare

isAdvice

protected boolean isAdvice

isAround

protected boolean isAround

proceed

protected MethodInstance proceed

inCflow

protected boolean inCflow

cflowMustBind

protected java.util.Collection cflowMustBind

inIf

protected boolean inIf

currentAspect

protected AspectType currentAspect
Constructor Detail

AJContext_c

public AJContext_c(TypeSystem ts)
Method Detail

pushDeclare

public AJContext pushDeclare()
Description copied from interface: AJContext
enter a declare warning/error declaration

Specified by:
pushDeclare in interface AJContext

inDeclare

public boolean inDeclare()
Description copied from interface: AJContext
are we in a declare decl?

Specified by:
inDeclare in interface AJContext

pushCflow

public AJContext pushCflow(java.util.Collection mustBind)
Description copied from interface: AJContext
mark entry of cflow pointcut expr

Specified by:
pushCflow in interface AJContext

inCflow

public boolean inCflow()
Description copied from interface: AJContext
inside a cflow?

Specified by:
inCflow in interface AJContext

getCflowMustBind

public java.util.Collection getCflowMustBind()
Description copied from interface: AJContext
get the names of variables that are bound in the smallest enclosing cflow

Specified by:
getCflowMustBind in interface AJContext

pushIf

public AJContext pushIf()
Description copied from interface: AJContext
mark entry of if pointcut expr

Specified by:
pushIf in interface AJContext

inIf

public boolean inIf()
Description copied from interface: AJContext
inside an if pointcut?

Specified by:
inIf in interface AJContext

pushAdvice

public AJContext pushAdvice(boolean isAround)
Specified by:
pushAdvice in interface AJContext

inAdvice

public boolean inAdvice()
Specified by:
inAdvice in interface AJContext

addProceed

public void addProceed(MethodInstance mi)
Specified by:
addProceed in interface AJContext

proceedInstance

public MethodInstance proceedInstance()
Specified by:
proceedInstance in interface AJContext

getAspect

public ClassType getAspect()

inInterType

public boolean inInterType()
Description copied from interface: AJContext
in scope of an intertype decl?

Specified by:
inInterType in interface AJContext

nested

public boolean nested()
Description copied from interface: AJContext
inner class inside intertype decl?

Specified by:
nested in interface AJContext

hostClass

public ClassType hostClass()
Specified by:
hostClass in interface AJContext

pushClass

public Context pushClass(ParsedClassType c,
                         ClassType t)

pushHost

public Context pushHost(ClassType t,
                        boolean declaredStatic)
Description copied from interface: AJContext
enter an intertype decl

Specified by:
pushHost in interface AJContext

pushStatic

public Context pushStatic()

explicitlyStatic

public boolean explicitlyStatic()
Description copied from interface: AJContext
was the ITD itself declared static?

Specified by:
explicitlyStatic in interface AJContext

push

protected Context_c push()

findFieldScopeInHost

public ClassType findFieldScopeInHost(java.lang.String name)
Finds the class which added a field to the scope.

Specified by:
findFieldScopeInHost in interface AJContext

findMethodScopeInHost

public ClassType findMethodScopeInHost(java.lang.String name)
Finds the class which added a method to the host scope.

Specified by:
findMethodScopeInHost in interface AJContext

type

protected ClassType type()

findMethod

public MethodInstance findMethod(java.lang.String name,
                                 java.util.List argTypes)
                          throws SemanticException
Looks up a method with name "name" and arguments compatible with "argTypes".

Throws:
SemanticException

findMethodScope

public ClassType findMethodScope(java.lang.String name)
                          throws SemanticException
Finds the class which added a method to the scope.

Throws:
SemanticException

findMethodContainerInThisScope

public ClassType findMethodContainerInThisScope(java.lang.String name)

findVariableInThisScope

public VarInstance findVariableInThisScope(java.lang.String name)

findInThisScope

public Named findInThisScope(java.lang.String name)

startHostScope

public AJContext startHostScope()

endHostScope

public AJContext endHostScope()

varInHost

public boolean varInHost(java.lang.String name)
Description copied from interface: AJContext
was a field of this name introduced via the host?

Specified by:
varInHost in interface AJContext

methodInHost

public boolean methodInHost(java.lang.String name)
Description copied from interface: AJContext
was a method by this name introduced via the host?

Specified by:
methodInHost in interface AJContext

addITMembers

public AJContext addITMembers(ReferenceType type)
Description copied from interface: AJContext
add all the members from the intertype host that are accessible

Specified by:
addITMembers in interface AJContext

pushAspect

public Context pushAspect(AspectType type)
Specified by:
pushAspect in interface AJContext

currentAspect

public AspectType currentAspect()
Description copied from interface: AJContext
Get enclosing aspect, or null

Specified by:
currentAspect in interface AJContext

findPointcutScope

public ClassType findPointcutScope(java.lang.String name)
                            throws SemanticException
pointcut lookup

Specified by:
findPointcutScope in interface AJContext
Throws:
SemanticException