public class MethodTranslator extends java.lang.Object implements Translator<Method>
| Constructor and Description |
|---|
MethodTranslator(JavaCompiler javac,
JavaCompilerHelper helper) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doCaptureTimeouts(Method model) |
protected boolean |
doTraceEnteringExiting() |
protected boolean |
doTraceErrors() |
protected boolean |
doTraceReturning() |
protected boolean |
doTraceValueChanges() |
protected JavaCompilerHelper |
getHelper() |
protected JavaCompiler |
getJavac() |
protected boolean |
isAnnotatedOnlyMode() |
boolean |
isIncludedClassOrMethod(Method model) |
protected boolean |
isMethodExcluded(Method model) |
protected void |
traceEnteringExiting(Method model) |
protected void |
traceErrors(Method model) |
protected void |
traceReturn(Method model) |
protected void |
traceTimeout(Method model) |
protected void |
traceValueChanges(Method model)
Destructive procedure that modifies the method body to contain a 'change' event signal after each assignment operator.
|
protected void |
transformConstructor(Method model) |
protected void |
transformToBlockConstructs(Method model) |
void |
translate(Method model)
After instrumentation, the method will have a structure like one presented here:
|
public MethodTranslator(JavaCompiler javac, JavaCompilerHelper helper)
protected boolean doTraceValueChanges()
protected boolean doTraceErrors()
protected boolean doTraceEnteringExiting()
protected boolean doTraceReturning()
protected boolean doCaptureTimeouts(Method model)
protected boolean isAnnotatedOnlyMode()
public void translate(Method model)
GW.enteringStatement(...) try { ... original method body ... GW.returning(...) } catch (Throwable t) { GW.onError(...); } finally { GW.exitingStatement(...) }
translate in interface Translator<Method>model - - method that will be instrumentedprotected void traceEnteringExiting(Method model)
protected void traceReturn(Method model)
protected void traceTimeout(Method model)
protected void traceErrors(Method model)
protected void traceValueChanges(Method model)
model - - method representation that gets modifiedprotected void transformConstructor(Method model)
protected void transformToBlockConstructs(Method model)
protected boolean isMethodExcluded(Method model)
protected JavaCompiler getJavac()
protected JavaCompilerHelper getHelper()
public boolean isIncludedClassOrMethod(Method model)