1 /******************************************************************************* 2 * Copyright (c) 2008 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package x.y.z; 15 16 import f.FieldUsageClass; 17 18 /** 19 * Tests field usage, where the accessed field is tagged with a noreference tag 20 */ 21 public class testF3 { 22 23 /** 24 * Constructor 25 */ testF3()26 public testF3() { 27 FieldUsageClass c = new FieldUsageClass(); 28 int f3 = FieldUsageClass.f3; 29 int f4 = c.f4; 30 } 31 32 public static class inner { 33 /** 34 * Constructor 35 */ inner()36 public inner() { 37 FieldUsageClass c = new FieldUsageClass(); 38 int f3 = FieldUsageClass.f3; 39 int f4 = c.f4; 40 } 41 } 42 43 class inner2 { 44 /** 45 * Constructor 46 */ inner2()47 public inner2() { 48 FieldUsageClass c = new FieldUsageClass(); 49 int f3 = FieldUsageClass.f3; 50 int f4 = c.f4; 51 } 52 } 53 } 54 55 class outer { 56 /** 57 * Constructor 58 */ outer()59 public outer() { 60 FieldUsageClass c = new FieldUsageClass(); 61 int f3 = FieldUsageClass.f3; 62 int f4 = c.f4; 63 } 64 } 65