1 /*
2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.
8  *
9  * This code is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  */
23 
24 package pkg5;
25 
26 public class Interfaces {
27      public interface A {
28 
29          /** field f in A */
30          public int f = 0;
31 
32          public static String QUOTE = "Winter is coming";
33 
34          /** a documented static method */
msd()35          public static void msd() {}
36 
37          /* An undocumented static method */
msn()38          public static void msn() {}
39 
40          /** A property in parent */
41          DoubleProperty rate = null;
setRate(double l)42          public void setRate(double l);
getRate()43          public double getRate();
rateProperty()44          public DoubleProperty rateProperty();
45          // A support class
46          public interface DoubleProperty {}
47 
48          /** AA in A */
49          public interface AA {}
50 
51          /** m0 in A */
m0()52          public void m0();
53 
54          /** m1 in A */
m1()55          public void m1();
56 
57          /** m2 in A */
m2()58          public void m2();
59 
60          /** m3 in A */
m3()61          public void m3();
62      }
63 
64      public interface B extends A {
65          // No comment
m0()66          public void m0();
67 
68          /** m1 in B */
m1()69          public void m1();
70 
71          /** {@inheritDoc} */
m2()72          public void m2();
73 
74          /** @throws Exception e */
m3()75          public void m3() throws Exception;
76 
77          /** n in B */
n()78          public void n();
79      }
80 
81      public interface C extends A, B  {
82          /** m in C */
m()83          public void m();
84 
85          /** o in C */
o()86          public void o();
87      }
88 
89     /**
90      * The child of all children.
91      *
92      * Start of links <p>
93      * {@link m0},
94      * {@link m1},
95      * {@link m2},
96      * {@link m3},
97      * {@link m},
98      * {@link n},
99      * {@link o},
100      * End of links
101      *
102      * @see #m0()
103      * @see #m1()
104      * @see #m2()
105      * @see #m3()
106      * @see #m
107      * @see #n
108      * @see #o
109      */
110     public interface D extends A, B, C {
111          /** m in D */
m()112          public void m();
113 
114          /** n in D */
n()115          public void n();
116 
117          // no comment
o()118          public void o();
119      }
120  }
121