GeneratorConstants.java
1/*******************************************************************************
2 * Copyright (c) 2009 Mountainminds GmbH & Co. KG and others
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Marc R. Hoffmann - initial API and implementation
10 *
11 * $Id: $
12 *******************************************************************************/
13package org.jacoco.core.instr;
14
15import org.objectweb.asm.Opcodes;
16import org.objectweb.asm.Type;
17
18/**
19 * Constants for generated instrumentation code.
20 *
21 * @author Marc R. Hoffmann
22 * @version $Revision: $
23 */
24public final class GeneratorConstants {
25
26 /**
27 * Type for array of primitive boolean values. This type is used to store
28 * executed probes of a class.
29 */
30 public static final Type PROBEDATA_TYPE = Type.getType("[Z");
31
32 // === Data Field ===
33
34 /**
35 * Name of the field that stores coverage information of a class.
36 */
37 public static final String DATAFIELD_NAME = "$jacocoData";
38
39 /**
40 * Access modifiers of the field that stores coverage information of a
41 * class.
42 */
43 public static final int DATAFIELD_ACC = Opcodes.ACC_SYNTHETIC
44 | Opcodes.ACC_PRIVATE | Opcodes.ACC_STATIC | Opcodes.ACC_FINAL;
45
46 // === Init Method ===
47
48 /**
49 * Name of the initialization method.
50 */
51 public static final String INITMETHOD_NAME = "$jacocoInit";
52
53 /**
54 * Descriptor of the initialization method.
55 */
56 public static final String INITMETHOD_DESC = "()[Z";
57
58 /**
59 * Access modifiers of the initialization method.
60 */
61 public static final int INITMETHOD_ACC = Opcodes.ACC_SYNTHETIC
62 | Opcodes.ACC_PRIVATE | Opcodes.ACC_STATIC | Opcodes.ACC_FINAL;
63
64}