public class BranchInstrumentation extends Object implements MethodInstrumentation
BranchInstrumentation class.
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger
Constant
logger |
| Constructor and Description |
|---|
BranchInstrumentation() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDefaultCaseCoveredCall(BytecodeInstruction v,
org.objectweb.asm.tree.InsnList instrumentation,
int defaultCaseBranchId)
addDefaultCaseCoveredCall
|
protected void |
addDefaultCaseInstrumentation(BytecodeInstruction v,
org.objectweb.asm.tree.InsnList instrumentation,
org.objectweb.asm.tree.AbstractInsnNode mySwitch,
org.objectweb.asm.tree.LabelNode defaultLabel,
org.objectweb.asm.tree.LabelNode caseLabel,
org.objectweb.asm.tree.LabelNode endLabel)
addDefaultCaseInstrumentation
|
protected void |
addDefaultCaseNotCoveredCall(BytecodeInstruction v,
org.objectweb.asm.tree.InsnList instrumentation,
int defaultCaseBranchId)
addDefaultCaseNotCoveredCall
|
protected void |
addInstrumentationForDefaultLookupswitchCase(BytecodeInstruction v,
org.objectweb.asm.tree.InsnList instrumentation)
addInstrumentationForDefaultLookupswitchCase
|
protected void |
addInstrumentationForDefaultSwitchCase(BytecodeInstruction v,
org.objectweb.asm.tree.InsnList instrumentation)
addInstrumentationForDefaultSwitchCase
|
protected void |
addInstrumentationForDefaultTableswitchCase(BytecodeInstruction v,
org.objectweb.asm.tree.InsnList instrumentation)
addInstrumentationForDefaultTableswitchCase
|
protected void |
addInstrumentationForSwitchCases(BytecodeInstruction v,
org.objectweb.asm.tree.InsnList instrumentation,
String className,
String methodName)
For each actual case
|
void |
analyze(ClassLoader classLoader,
org.objectweb.asm.tree.MethodNode mn,
String className,
String methodName,
int access)
analyze
|
boolean |
executeOnExcludedMethods()
if this method returns true the analyze method is also called on methods
which are excluded in CFGMethodAdapter.EXCLUDE
|
boolean |
executeOnMainMethod()
If this method returns true, the analyze method is also called on public
static void main() methods
|
protected org.objectweb.asm.tree.InsnList |
getInstrumentation(BytecodeInstruction instruction)
getInstrumentation
|
protected org.objectweb.asm.tree.InsnList |
getSwitchInstrumentation(BytecodeInstruction v,
org.objectweb.asm.tree.MethodNode mn,
String className,
String methodName)
Creates the instrumentation for switch statements as follows:
For each case
|
public void analyze(ClassLoader classLoader, org.objectweb.asm.tree.MethodNode mn, String className, String methodName, int access)
analyze
analyze in interface MethodInstrumentationmn - the ASM Node of the methodclassName - the name of current classmethodName - the name of the current method. This name includes the
description of the method and is therefore unique per class.access - the access of the current method (see
org.objectweb.asm.ClassAdapter#visitMethod(int access, String
name, String descriptor, String signature, String[]
exceptions))protected org.objectweb.asm.tree.InsnList getInstrumentation(BytecodeInstruction instruction)
getInstrumentation
instruction - a BytecodeInstruction object.InsnList object.protected org.objectweb.asm.tree.InsnList getSwitchInstrumentation(BytecodeInstruction v, org.objectweb.asm.tree.MethodNode mn, String className, String methodName)
v - a BytecodeInstruction object.mn - a MethodNode object.className - a String object.methodName - a String object.InsnList object.protected void addInstrumentationForSwitchCases(BytecodeInstruction v, org.objectweb.asm.tree.InsnList instrumentation, String className, String methodName)
v - a BytecodeInstruction object.instrumentation - a InsnList object.className - a String object.methodName - a String object.protected void addInstrumentationForDefaultSwitchCase(BytecodeInstruction v, org.objectweb.asm.tree.InsnList instrumentation)
addInstrumentationForDefaultSwitchCase
v - a BytecodeInstruction object.instrumentation - a InsnList object.protected void addInstrumentationForDefaultTableswitchCase(BytecodeInstruction v, org.objectweb.asm.tree.InsnList instrumentation)
addInstrumentationForDefaultTableswitchCase
v - a BytecodeInstruction object.instrumentation - a InsnList object.protected void addInstrumentationForDefaultLookupswitchCase(BytecodeInstruction v, org.objectweb.asm.tree.InsnList instrumentation)
addInstrumentationForDefaultLookupswitchCase
v - a BytecodeInstruction object.instrumentation - a InsnList object.protected void addDefaultCaseInstrumentation(BytecodeInstruction v, org.objectweb.asm.tree.InsnList instrumentation, org.objectweb.asm.tree.AbstractInsnNode mySwitch, org.objectweb.asm.tree.LabelNode defaultLabel, org.objectweb.asm.tree.LabelNode caseLabel, org.objectweb.asm.tree.LabelNode endLabel)
addDefaultCaseInstrumentation
v - a BytecodeInstruction object.instrumentation - a InsnList object.mySwitch - a AbstractInsnNode object.defaultLabel - a LabelNode object.caseLabel - a LabelNode object.endLabel - a LabelNode object.protected void addDefaultCaseCoveredCall(BytecodeInstruction v, org.objectweb.asm.tree.InsnList instrumentation, int defaultCaseBranchId)
addDefaultCaseCoveredCall
v - a BytecodeInstruction object.instrumentation - a InsnList object.defaultCaseBranchId - a int.protected void addDefaultCaseNotCoveredCall(BytecodeInstruction v, org.objectweb.asm.tree.InsnList instrumentation, int defaultCaseBranchId)
addDefaultCaseNotCoveredCall
v - a BytecodeInstruction object.instrumentation - a InsnList object.defaultCaseBranchId - a int.public boolean executeOnExcludedMethods()
executeOnExcludedMethods in interface MethodInstrumentationpublic boolean executeOnMainMethod()
executeOnMainMethod in interface MethodInstrumentationCopyright © 2010–2017 EvoSuite. All rights reserved.