Debian Codegraph @

org.eclipse.jdt.compiler.apt.tests/resources/targets/model/pc/Overriding.java

raw
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 package targets.model.pc;
12
13 public class Overriding {
14 public class A {
15 public void f() {} // overrides OverB.f() in context of OverC, but not in context of OverD
16 private void g() {} // does not override OverB.g() in any context
17 public void h() {} // overrides OverB.h() in context of OverC and OverD
18 public void j() {}
19 }
20
21 public interface B {
22 public void f();
23 public void g();
24 public void h();
25 }
26
27 abstract public class C extends A implements B {
28 public void h() {}
29 public void j() {}
30 }
31
32 public class D extends C {
33 public void f() {}
34 public void g() {}
35 public void j() {}
36 }
37 }
38