abc.aspectj.ast
Class AspectDecl_c

java.lang.Object
  extended by ClassDecl_c
      extended by abc.aspectj.extension.AJClassDecl_c
          extended by abc.aspectj.ast.AspectDecl_c
All Implemented Interfaces:
AspectDecl, MakesAspectMethods, ContainsAspectInfo

public class AspectDecl_c
extends AJClassDecl_c
implements AspectDecl, ContainsAspectInfo, MakesAspectMethods

A AspectDecl is the definition of an aspect, abstract aspect, or privileged. It may be a public or other top-level aspect, or an inner named aspect.

Author:
Oege de Moor, Aske Simon Christensen

Field Summary
protected  MethodInstance aspectOfInstance
           
protected  MethodInstance hasAspectInstance
           
protected  PerClause per
           
 
Fields inherited from class abc.aspectj.extension.AJClassDecl_c
hierarchyBuilt, superDisambiguated
 
Constructor Summary
AspectDecl_c(Position pos, boolean is_privileged, Flags flags, java.lang.String name, TypeNode superClass, java.util.List interfaces, PerClause per, AspectBody body)
           
 
Method Summary
 AspectDecl addAspectMembers(NodeFactory nf, AJTypeSystem ts)
          add the aspectOf and hasAspect methods to the aspect class, but only if it is concrete
 NodeVisitor addMembersEnter(AddMemberVisitor am)
           
 void aspectMethodsEnter(AspectMethods visitor)
           
 Node aspectMethodsLeave(AspectMethods visitor, AJNodeFactory nf, AJTypeSystem ts)
           
 NodeVisitor buildTypesEnter(TypeBuilder tb)
           
 NodeVisitor disambiguateEnter(AmbiguityRemover ar)
           
 Context enterScope(Context c)
           
 Context enterScope(Node child, Context c)
           
 void prettyPrintHeader(CodeWriter w, PrettyPrinter tr)
           
protected  AspectDecl_c reconstruct(TypeNode superClass, java.util.List interfaces, PerClause per, ClassBody body)
           
 Node typeCheck(TypeChecker tc)
           
 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.extension.AJClassDecl_c
addSuperDependencies, disambiguate, disambiguateSuperType, hierarchyBuilt, setHierarchyBuilt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

per

protected PerClause per

hasAspectInstance

protected MethodInstance hasAspectInstance

aspectOfInstance

protected MethodInstance aspectOfInstance
Constructor Detail

AspectDecl_c

public AspectDecl_c(Position pos,
                    boolean is_privileged,
                    Flags flags,
                    java.lang.String name,
                    TypeNode superClass,
                    java.util.List interfaces,
                    PerClause per,
                    AspectBody body)
Method Detail

addAspectMembers

public AspectDecl addAspectMembers(NodeFactory nf,
                                   AJTypeSystem ts)
add the aspectOf and hasAspect methods to the aspect class, but only if it is concrete


buildTypesEnter

public NodeVisitor buildTypesEnter(TypeBuilder tb)
                            throws SemanticException
Throws:
SemanticException

addMembersEnter

public NodeVisitor addMembersEnter(AddMemberVisitor am)

disambiguateEnter

public NodeVisitor disambiguateEnter(AmbiguityRemover ar)
                              throws SemanticException
Throws:
SemanticException

reconstruct

protected AspectDecl_c reconstruct(TypeNode superClass,
                                   java.util.List interfaces,
                                   PerClause per,
                                   ClassBody body)

visitChildren

public Node visitChildren(NodeVisitor v)

enterScope

public Context enterScope(Node child,
                          Context c)

enterScope

public Context enterScope(Context c)

prettyPrintHeader

public void prettyPrintHeader(CodeWriter w,
                              PrettyPrinter tr)

typeCheck

public Node typeCheck(TypeChecker tc)
               throws SemanticException
Overrides:
typeCheck in class AJClassDecl_c
Throws:
SemanticException

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.

aspectMethodsEnter

public void aspectMethodsEnter(AspectMethods visitor)
Specified by:
aspectMethodsEnter in interface MakesAspectMethods
Overrides:
aspectMethodsEnter in class AJClassDecl_c

aspectMethodsLeave

public Node aspectMethodsLeave(AspectMethods visitor,
                               AJNodeFactory nf,
                               AJTypeSystem ts)
Specified by:
aspectMethodsLeave in interface MakesAspectMethods
Overrides:
aspectMethodsLeave in class AJClassDecl_c