1 /******************************************************************************* 2 * Copyright (c) 2009, 2018 Mountainminds GmbH & Co. KG and Contributors 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 *******************************************************************************/ 12 package org.jacoco.core.test.validation.targets; 13 14 import static org.jacoco.core.test.validation.targets.Stubs.i1; 15 16 /** 17 * This test target is a class with a static initializer. 18 */ 19 public class Target05 { 20 21 // No code required to initialize these fields: 22 23 public static final int CONST1 = 3; // $line-const1$ 24 25 public static final String CONST2 = "Hello"; // $line-const2$ 26 27 // These fields are initialized within <clinit> 28 29 public static final int CONST3 = i1(); // $line-const3$ 30 31 public static final Object CONST4 = new Object(); // $line-const4$ 32 33 public static int field1 = 3; // $line-field1$ 34 35 public static String field2 = "Hello"; // $line-field2$ 36 37 public static int field3 = i1(); // $line-field3$ 38 39 public static Object field4 = new Object(); // $line-field4$ 40 41 static { 42 Stubs.nop(); // $line-staticblock$ 43 } 44 45 private Target05() { 46 } 47 48 public static void main(String[] args) { 49 } 50 51 } 52