public class InstrumentationUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
InstrumentationUtils.MethodDescriptor |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_INIT |
static java.lang.String |
CONSTRUCTOR |
static java.lang.String |
CONSTRUCTOR_DESCRIPTOR |
static java.lang.String |
OBJECT_TYPE |
| Constructor and Description |
|---|
InstrumentationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getBytecodeVersion(org.jetbrains.coverage.org.objectweb.asm.ClassReader cr) |
static java.util.List<java.lang.String> |
getClassAnnotations(org.jetbrains.coverage.org.objectweb.asm.ClassReader cr)
Get the annotations of a class in the bytecode.
|
static InstrumentationUtils.MethodDescriptor |
getOuterClass(org.jetbrains.coverage.org.objectweb.asm.ClassReader cr)
Get the outer class of a class in the bytecode.
|
static java.lang.String |
getParentClassIfIsInner(org.jetbrains.coverage.org.objectweb.asm.ClassReader cr)
Get the name of the parent class if the given class is an inner class.
|
static boolean |
isCondyEnabled(org.jetbrains.coverage.org.objectweb.asm.ClassReader cr) |
static void |
push(org.jetbrains.coverage.org.objectweb.asm.MethodVisitor mv,
java.lang.Object o)
Push value on stack.
|
static void |
pushInt(org.jetbrains.coverage.org.objectweb.asm.MethodVisitor mv,
int value) |
static void |
touchById(org.jetbrains.coverage.org.objectweb.asm.MethodVisitor mv,
int id,
boolean calculateHits)
Util method for touching coverage counter which is stored in an array.
|
public static final java.lang.String OBJECT_TYPE
public static final java.lang.String CLASS_INIT
public static final java.lang.String CONSTRUCTOR
public static final java.lang.String CONSTRUCTOR_DESCRIPTOR
public static void touchById(org.jetbrains.coverage.org.objectweb.asm.MethodVisitor mv,
int id,
boolean calculateHits)
mv - current method visitorid - index of a hit in the arraypublic static int getBytecodeVersion(org.jetbrains.coverage.org.objectweb.asm.ClassReader cr)
public static boolean isCondyEnabled(org.jetbrains.coverage.org.objectweb.asm.ClassReader cr)
public static void pushInt(org.jetbrains.coverage.org.objectweb.asm.MethodVisitor mv,
int value)
public static void push(org.jetbrains.coverage.org.objectweb.asm.MethodVisitor mv,
java.lang.Object o)
o - value to push must be primitive or Stringpublic static java.lang.String getParentClassIfIsInner(org.jetbrains.coverage.org.objectweb.asm.ClassReader cr)
cr - the ClassReader that reads the class filepublic static java.util.List<java.lang.String> getClassAnnotations(org.jetbrains.coverage.org.objectweb.asm.ClassReader cr)
cr - the ClassReader that reads the class filepublic static InstrumentationUtils.MethodDescriptor getOuterClass(org.jetbrains.coverage.org.objectweb.asm.ClassReader cr)
cr - the ClassReader that reads the class file