langtools/test/tools/sjavac/test-input/src/pkg/Test.java
changeset 31175 65b2763f4209
parent 31174 f3e2593f91cc
parent 31153 f401ebd48ef9
child 31176 db59cb6634af
child 31440 21d1b32bafb6
equal deleted inserted replaced
31174:f3e2593f91cc 31175:65b2763f4209
     1 /*
       
     2  * Copyright (c) 2014, 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.  Oracle designates this
       
     8  * particular file as subject to the "Classpath" exception as provided
       
     9  * by Oracle in the LICENSE file that accompanied this code.
       
    10  *
       
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14  * version 2 for more details (a copy is included in the LICENSE file that
       
    15  * accompanied this code).
       
    16  *
       
    17  * You should have received a copy of the GNU General Public License version
       
    18  * 2 along with this work; if not, write to the Free Software Foundation,
       
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20  *
       
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    22  * or visit www.oracle.com if you need additional information or have any
       
    23  * questions.
       
    24  */
       
    25 // Use fully qualified names to avoid accidentally capturing dependencies in import statements.
       
    26 
       
    27 package pkg;
       
    28 
       
    29 import pkg2.*;                                          // pkg2 as a whole
       
    30 import pkg3.Cls3;                                       // pkg3.Cls3
       
    31 import pkg25.Cls25;                                     // pkg25.Cls25
       
    32 import nondependency.pkg26.Cls26;                       // pkg26.Cls26 (but not nondependency)
       
    33 import pkg28.Cls28.Inner28;                             // pkg29.Cls28, pkg29.Cls28.Inner28
       
    34 import static pkg29.Cls29.Inner29;                      // pkg29.Cls29, pkg29.Cls29.Inner29
       
    35 import static pkg30.Cls30.*;                            // pkg30.Cls30 as a whole
       
    36 
       
    37 @pkg5.Anno5                                             // pkg5.Anno5
       
    38 public class Test<S extends pkg23.Cls23>                // pkg23.Cls23
       
    39         extends pkg4.Cls4/*extends pkg11.Cls11*/<pkg6.Cls6/*extends pkg12.Cls12*/>   // pkg4.Cls4, pkg11.Cls11, pkg6.Cls6, pkg12.Cls12
       
    40         implements pkg7.Cls7, pkg8.Cls8<pkg9.Cls9> {    // pkg7.Cls7, pkg8.Cls8, pkg9.Cls9
       
    41 
       
    42     pkg27.Cls27 cls27[][][] = new pkg27.Cls27[0][0][0]; // pkg27.Cls27
       
    43 
       
    44     pkg2.Cls2 cls2;
       
    45     pkg19.Cls19 f19;                                    // pkg19.Cls19
       
    46 
       
    47     public static void main(String[] args) {            // java.lang.String
       
    48         pkg10.Cls10 o = new pkg10.Cls10();              // pkg10.Cls10
       
    49 
       
    50         o.getCls13().getCls14().getCls15();             // pkg13.Cls13, pkg14.Cls14, pkg15.Cls15
       
    51         pkg23.Cls23.f24 = null;                         // pkg23.Cls23, pkg24.Cls24
       
    52     }
       
    53 
       
    54     static pkg16.Cls16 m1(pkg17.Cls17 o) {              // pkg16.Cls16, pkg17.Cls17
       
    55         return null;
       
    56     }
       
    57 
       
    58     public <T extends pkg18.Cls18> void m2() {          // pkg18.Cls18
       
    59     }
       
    60 
       
    61     public <T> T m3() {
       
    62         T t;
       
    63         t = null;
       
    64         return t;
       
    65     }
       
    66 
       
    67     @pkg20.Anno20(pkg21.Cls21.class)                    // pkg20.Anno20, pkg21.Cls21
       
    68     private void m3(@pkg22.Anno22 String s) {           // pkg22.Anno22
       
    69         Runnable r = () -> { System.out.println("hello"); };
       
    70     }
       
    71 
       
    72     private void m4() throws Cls25 {                    // pkg25.Cls25
       
    73     }
       
    74 }