org.jacoco.core.internal.instr

## Class InstrSupport

- java.lang.Object
- - org.jacoco.core.internal.instr.InstrSupport

    public final class InstrSupport
    extends Object

Constants and utilities for byte code instrumentation.

### Field Summary

Fields
`static int` `DATAFIELD_ACC` Access modifiers of the field that stores coverage information of a class.
`static String` `DATAFIELD_DESC` Data type of the field that stores coverage information for a class ( `boolean[]`).
`static int` `DATAFIELD_INTF_ACC` Access modifiers of the field that stores coverage information of a Java 8 interface.
`static String` `DATAFIELD_NAME` Name of the field that stores coverage information of a class.
`static int` `INITMETHOD_ACC` Access modifiers of the initialization method.
`static String` `INITMETHOD_DESC` Descriptor of the initialization method.
`static String` `INITMETHOD_NAME` Name of the initialization method.

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `assertNotInstrumented(String member, String owner)` Ensures that the given member does not correspond to a internal member created by the instrumentation process.
`static void` `push(org.objectweb.asm.MethodVisitor mv, int value)` Generates the instruction to push the given int value on the stack.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DATAFIELD_NAME

    public static final String DATAFIELD_NAME

Name of the field that stores coverage information of a class.

See Also:
  Constant Field Values

#### DATAFIELD_ACC

    public static final int DATAFIELD_ACC

Access modifiers of the field that stores coverage information of a class. According to Java Virtual Machine Specification §6.5.putstatic this field must not be final:

> if the field is final, it must be declared in the current class, and the instruction must occur in the `<clinit>` method of the current class.

See Also:
  Constant Field Values

#### DATAFIELD_INTF_ACC

    public static final int DATAFIELD_INTF_ACC

Access modifiers of the field that stores coverage information of a Java 8 interface. According to Java Virtual Machine Specification §4.5:

> Fields of interfaces must have their ACC_PUBLIC, ACC_STATIC, and ACC_FINAL flags set; they may have their ACC_SYNTHETIC flag set and must not have any of the other flags.

See Also:
  Constant Field Values

#### DATAFIELD_DESC

    public static final String DATAFIELD_DESC

Data type of the field that stores coverage information for a class ( `boolean[]`).

See Also:
  Constant Field Values

#### INITMETHOD_NAME

    public static final String INITMETHOD_NAME

Name of the initialization method.

See Also:
  Constant Field Values

#### INITMETHOD_DESC

    public static final String INITMETHOD_DESC

Descriptor of the initialization method.

See Also:
  Constant Field Values

#### INITMETHOD_ACC

    public static final int INITMETHOD_ACC

Access modifiers of the initialization method.

See Also:
  Constant Field Values

### Method Detail

#### assertNotInstrumented

    public static void assertNotInstrumented(String member,
                                             String owner)
                                      throws IllegalStateException

Ensures that the given member does not correspond to a internal member created by the instrumentation process. This would mean that the class is already instrumented.

Parameters:
  `member` - name of the member to check
  `owner` - name of the class owning the member
Throws:
  `IllegalStateException` - thrown if the member has the same name than the instrumentation member

#### push

    public static void push(org.objectweb.asm.MethodVisitor mv,
                            int value)

Generates the instruction to push the given int value on the stack. Implementation taken from `GeneratorAdapter.push(int)`.

Parameters:
  `mv` - visitor to emit the instruction
  `value` - the value to be pushed on the stack.