abc.eaj
Class AbcExtension

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

public class AbcExtension
extends AbcExtension

Author:
Julian Tibble, Pavel Avgustinov, 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.
 SJPInfo createSJPInfo(java.lang.String kind, java.lang.String signatureTypeClass, java.lang.String signatureType, java.lang.String signature, Host host)
          Create a (compile-time) static join point information object that generates code to initialize static join point fields with reflective information about a join point.
protected  Weaver createWeaver()
          Override this to create a custom weaver.
 void doMethodRestructuring()
          This method is called right after "declare parents" has been processed and all Jimple bodies have been loaded.
 void initLexerKeywords(AbcLexer lexer)
          Initialise the HashMaps that define how keywords are handled in the different lexer states.
protected  java.util.List listShadowTypes()
          Override this method to add new joinpoints to the abc.
 AdviceInliner makeAdviceInliner()
          Make a new AdviceInliner, which is responsible for inlining advice bodies, as well as pointcuts which are implemented by methods, such as if.
 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.
 java.lang.String runtimeSJPFactoryClass()
          Specify the class that will be used at runtime to generate StaticJoinPoint objects.
 
Methods inherited from class abc.main.AbcExtension
addJimplePacks, createCompileSequence, createGlobalAspectInfo, createReweavingPasses, findMethodShadows, forceReportError, getCompileSequence, getErrorQueue, getGlobalAspectInfo, getPrecedence, 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

listShadowTypes

protected java.util.List listShadowTypes()
Description copied from class: AbcExtension
Override this method to add new joinpoints to the abc. Call the same method in the super-class to ensure the standard joinpoints needed are loaded too.

Overrides:
listShadowTypes in class AbcExtension

makeAdviceInliner

public AdviceInliner makeAdviceInliner()
Description copied from class: AbcExtension
Make a new AdviceInliner, which is responsible for inlining advice bodies, as well as pointcuts which are implemented by methods, such as if. The instance is cached in abc.weaving.weaver.AdviceInliner, so we don't do so here like we do with the Weaver.

Overrides:
makeAdviceInliner 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

runtimeSJPFactoryClass

public java.lang.String runtimeSJPFactoryClass()
Description copied from class: AbcExtension
Specify the class that will be used at runtime to generate StaticJoinPoint objects.

Overrides:
runtimeSJPFactoryClass in class AbcExtension

createSJPInfo

public SJPInfo createSJPInfo(java.lang.String kind,
                             java.lang.String signatureTypeClass,
                             java.lang.String signatureType,
                             java.lang.String signature,
                             Host host)
Create a (compile-time) static join point information object that generates code to initialize static join point fields with reflective information about a join point.

Overrides:
createSJPInfo in class AbcExtension

createWeaver

protected 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

doMethodRestructuring

public void doMethodRestructuring()
Description copied from class: AbcExtension
This method is called right after "declare parents" has been processed and all Jimple bodies have been loaded. Subclasses can implement this method to do restrucuring of bodies prior to weaving. This default implementation does nothing.

Overrides:
doMethodRestructuring in class AbcExtension