abc.tm
Class AbcExtension

java.lang.Object
  extended by abc.main.AbcExtension
      extended by abc.eaj.AbcExtension
          extended by abc.tm.AbcExtension
Direct Known Subclasses:
AbcExtension

public class AbcExtension
extends AbcExtension

Author:
Julian Tibble, Oege de Moor, Eric Bodden

Constructor Summary
AbcExtension()
           
 
Method Summary
 void addBasicClassesToSoot()
          Call Scene.v().addBasicClass for each runtime class that the backend might generate code for.
protected  void collectVersions(java.lang.StringBuffer versions)
          Override this method to add the version information for this extension, calling the same method in the super-class to ensure that all extensions are reported.
 CompileSequence createCompileSequence()
          Creates the unique compile sequence for this extension.
protected  GlobalAspectInfo createGlobalAspectInfo()
          Override this to create a custom global aspect info.
protected  void createReweavingPasses(java.util.List passes)
          Adds a new reweaving passes to the pass list.
 Weaver createWeaver()
          Override this to create a custom weaver.
protected  int getPrec(AdviceDecl a, AdviceDecl b)
           
 int getPrecedence(AbstractAdviceDecl a, AbstractAdviceDecl b)
          amended for tracematches
 void initLexerKeywords(AbcLexer lexer)
          Initialise the HashMaps that define how keywords are handled in the different lexer states.
 ExtensionInfo makeExtensionInfo(java.util.Collection jar_classes, java.util.Collection aspect_sources)
          Creates an instance of the ExtensionInfo structure used for extending the Polyglot-based frontend.
 int tmGetPrec(TMAdviceDecl tma, TMAdviceDecl tmb)
          within a single tracematch, normal precedence rules apply for recognition of symbols.
 
Methods inherited from class abc.eaj.AbcExtension
createSJPInfo, doMethodRestructuring, listShadowTypes, makeAdviceInliner, runtimeSJPFactoryClass
 
Methods inherited from class abc.main.AbcExtension
addJimplePacks, findMethodShadows, forceReportError, getCompileSequence, getErrorQueue, getGlobalAspectInfo, getPrecNum, getReweavingPasses, getWeaver, reportError, reportError, residueConjuncts, resumeErrorReporting, setErrorQueue, shadowTypes, suspendErrorReporting, versions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbcExtension

public AbcExtension()
Method Detail

collectVersions

protected void collectVersions(java.lang.StringBuffer versions)
Description copied from class: AbcExtension
Override this method to add the version information for this extension, calling the same method in the super-class to ensure that all extensions are reported.

Overrides:
collectVersions in class AbcExtension

makeExtensionInfo

public ExtensionInfo makeExtensionInfo(java.util.Collection jar_classes,
                                       java.util.Collection aspect_sources)
Description copied from class: AbcExtension
Creates an instance of the ExtensionInfo structure used for extending the Polyglot-based frontend.

Overrides:
makeExtensionInfo in class AbcExtension

createGlobalAspectInfo

protected GlobalAspectInfo createGlobalAspectInfo()
Description copied from class: AbcExtension
Override this to create a custom global aspect info.

Overrides:
createGlobalAspectInfo in class AbcExtension

createWeaver

public Weaver createWeaver()
Description copied from class: AbcExtension
Override this to create a custom weaver.

Overrides:
createWeaver in class AbcExtension

initLexerKeywords

public void initLexerKeywords(AbcLexer lexer)
Description copied from class: AbcExtension
Initialise the HashMaps that define how keywords are handled in the different lexer states. Keywords are added by calling the methods addJavaKeyword(), addAspectJKeyword(), lexer.addPointcutKeyword() and addPointcutIfExprKeyword(), which are defined in the Lexer_c class. There are the utility methods lexer.addGlobalKeyword() (which adds its parameters to all four states) and lexer.addAspectJContextKeyword() (which adds its parameters to the AspectJ and PointcutIfExpr states). Each of these methods takes two arguments - a String (the keyword to be added) and a class implementing abc.aspectj.parse.LexerAction defining what to do when this keyword is encountered.

Overrides:
initLexerKeywords in class AbcExtension

addBasicClassesToSoot

public void addBasicClassesToSoot()
Description copied from class: AbcExtension
Call Scene.v().addBasicClass for each runtime class that the backend might generate code for. Derived implementations should normally make sure to call the superclass implementation.

Overrides:
addBasicClassesToSoot in class AbcExtension

createReweavingPasses

protected void createReweavingPasses(java.util.List passes)
Adds a new reweaving passes to the pass list.

Overrides:
createReweavingPasses in class AbcExtension
Parameters:
passes - the current list of reweaving passes; add your analysis passes here as needed; do not forget to call super

tmGetPrec

public int tmGetPrec(TMAdviceDecl tma,
                     TMAdviceDecl tmb)
within a single tracematch, normal precedence rules apply for recognition of symbols. the "some" advice has higher precedence than all symbols in the same tracematch if it is after advice; it has lower precedence than all symbols if it is before advice the "synch" advice always has higher precedence than anything else in the same tracematch


getPrec

protected int getPrec(AdviceDecl a,
                      AdviceDecl b)

getPrecedence

public int getPrecedence(AbstractAdviceDecl a,
                         AbstractAdviceDecl b)
amended for tracematches

Overrides:
getPrecedence in class AbcExtension
Parameters:
a - the first advice decl.
b - the second advice decl.
Returns:
GlobalAspectInfo.PRECEDENCE_NONE if none of the advice decls have precedence, GlobalAspectInfo.PRECEDENCE_FIRST if the first advice decl has precedence, GlobalAspectInfo.PRECEDENCE_SECOND if the second advice decl has precedence, or GlobalAspectInfo.PRECEDENCE_CONFLICT if there is a precedence conflict between the two advice decls.

createCompileSequence

public CompileSequence createCompileSequence()
Creates the unique compile sequence for this extension. This method is called exactly once.

Overrides:
createCompileSequence in class AbcExtension