1 /******************************************************************************* 2 * Copyright (c) 2007 BEA Systems, Inc. 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 import org.eclipse.jdt.compiler.apt.tests.annotations.InheritedAnno; 12 13 @InheritedAnno 14 @NotInheritedAnno 15 public class InheritanceA { 16 @InheritedAnno 17 @NotInheritedAnno InheritanceA()18 public InheritanceA() {} 19 20 @InheritedAnno 21 @NotInheritedAnno InheritanceA(int i)22 public InheritanceA(int i) {} 23 24 // Not a constructor: has a return value 25 @InheritedAnno 26 @NotInheritedAnno InheritanceA()27 public void InheritanceA() {} 28 29 @InheritedAnno 30 @NotInheritedAnno 31 public class AChild {} 32 33 public class ANotAnnotated {} 34 35 @InheritedAnno 36 @NotInheritedAnno 37 public interface AIntf {} 38 39 @InheritedAnno 40 @NotInheritedAnno foo()41 public void foo() {} 42 43 @InheritedAnno 44 @NotInheritedAnno 45 public int i; 46 47 @InheritedAnno 48 @NotInheritedAnno 49 public enum AEnum { A, B } 50 } 51 52 class InheritanceB extends InheritanceA { 53 public class BChild extends AChild {} 54 55 public class BNotAnnotated extends ANotAnnotated {} 56 57 public interface BIntf extends AIntf {} 58 foo()59 public void foo() {} 60 61 public int i; 62 }