|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectabc.main.AbcExtension
public class AbcExtension
This class should be sub-classed to extend the behaviour of abc
A sub-class, with overriden methods to effect some new behaviour, can be loaded at runtime by using the "-ext" switch to abc.
| Constructor Summary | |
|---|---|
AbcExtension()
|
|
| Method Summary | |
|---|---|
void |
addBasicClassesToSoot()
Call Scene.v().addBasicClass for each runtime class that the backend might generate code for. |
void |
addJimplePacks()
This method adds optimisation passes specificially required for abc. |
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. |
protected 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. |
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 |
findMethodShadows(GlobalAspectInfo info,
MethodAdviceList mal,
SootClass cls,
SootMethod method)
This method is responsible for taking a method and calling AdviceApplication.doShadows for each "position" in the method that might have a join point associated with it. |
void |
forceReportError(int level,
java.lang.String message,
Position position)
Reports an error, even if error reporting is suspended. |
CompileSequence |
getCompileSequence()
|
ErrorQueue |
getErrorQueue()
|
GlobalAspectInfo |
getGlobalAspectInfo()
Returns the GlobalAspectInfo structure, which stores all the AspectJ-specific information from the frontend for use in the backend. |
int |
getPrecedence(AbstractAdviceDecl a,
AbstractAdviceDecl b)
Get the precedence relationship between two aspects. |
protected int |
getPrecNum(AbstractAdviceDecl d)
|
java.util.List |
getReweavingPasses()
Returns the reweaving passes for this extension. |
Weaver |
getWeaver()
Returns the Weaver object, which co-ordinates everything that happens in the backend. |
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. |
void |
reportError(ErrorInfo ei)
Reports an error, if error reporting is not suspended. |
void |
reportError(int level,
java.lang.String s,
Position pos)
Reports an error, if error reporting is not suspended. |
java.util.List |
residueConjuncts(AbstractAdviceDecl ad,
Pointcut pc,
ShadowMatch sm,
SootMethod method,
SootClass cls,
WeavingEnv we)
return the list of residue conjuncts. |
void |
resumeErrorReporting()
Resumes error reporting after suspendErrorReporting() was called. |
java.lang.String |
runtimeSJPFactoryClass()
Specify the class that will be used at runtime to generate StaticJoinPoint objects. |
void |
setErrorQueue(ErrorQueue eq)
|
java.util.Iterator |
shadowTypes()
Get all the shadow joinpoints that are matched in this extension of AspectJ |
void |
suspendErrorReporting()
Suspends error reporting until resumeErrorReporting() is called. |
java.lang.String |
versions()
Constructs a version string for all loaded extensions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbcExtension()
| Method Detail |
|---|
public final java.lang.String versions()
protected void collectVersions(java.lang.StringBuffer versions)
public final CompileSequence getCompileSequence()
protected CompileSequence createCompileSequence()
public void reportError(ErrorInfo ei)
suspendErrorReporting(),
resumeErrorReporting()
public void reportError(int level,
java.lang.String s,
Position pos)
suspendErrorReporting(),
resumeErrorReporting()
public void forceReportError(int level,
java.lang.String message,
Position position)
suspendErrorReporting(),
resumeErrorReporting()
public ExtensionInfo makeExtensionInfo(java.util.Collection jar_classes,
java.util.Collection aspect_sources)
ExtensionInfo structure
used for extending the Polyglot-based frontend.
public final GlobalAspectInfo getGlobalAspectInfo()
protected GlobalAspectInfo createGlobalAspectInfo()
public final Weaver getWeaver()
protected Weaver createWeaver()
public AdviceInliner makeAdviceInliner()
public final java.util.Iterator shadowTypes()
protected java.util.List listShadowTypes()
public void addJimplePacks()
public void addBasicClassesToSoot()
public java.lang.String runtimeSJPFactoryClass()
public SJPInfo createSJPInfo(java.lang.String kind,
java.lang.String signatureTypeClass,
java.lang.String signatureType,
java.lang.String signature,
Host host)
public void initLexerKeywords(AbcLexer lexer)
public void findMethodShadows(GlobalAspectInfo info,
MethodAdviceList mal,
SootClass cls,
SootMethod method)
throws polyglot.types.SemanticException
polyglot.types.SemanticException
public int getPrecedence(AbstractAdviceDecl a,
AbstractAdviceDecl b)
a - the first advice decl.b - the second advice decl.
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.protected int getPrecNum(AbstractAdviceDecl d)
public java.util.List residueConjuncts(AbstractAdviceDecl ad,
Pointcut pc,
ShadowMatch sm,
SootMethod method,
SootClass cls,
WeavingEnv we)
protected void createReweavingPasses(java.util.List passes)
passes - the current list of reweaving passes; add your analysis passes
here as needed; do not forget to call superpublic final java.util.List getReweavingPasses()
public ErrorQueue getErrorQueue()
public void setErrorQueue(ErrorQueue eq)
public void suspendErrorReporting()
resumeErrorReporting() is called.
public void resumeErrorReporting()
suspendErrorReporting() was called.
public void doMethodRestructuring()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||