1 /*
   2  * Copyright (c) 2016, 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 p1;
  25 
  26 public class Holder {
  27     public Private_PublicClass             c1 = new Private_PublicClass();
  28     public Private_PublicInterface         c2 = new Private_PublicInterface();
  29     public Private_PrivateInterface1       c3 = new Private_PrivateInterface1();
  30     public Private_PrivateInterface2       c4 = new Private_PrivateInterface2();
  31 
  32     public Public_PublicClass              c5 = new Public_PublicClass();
  33     public Public_PublicInterface          c6 = new Public_PublicInterface();
  34     public Public_PrivateInterface1        c7 = new Public_PrivateInterface1();
  35     public Public_PrivateInterface2        c8 = new Public_PrivateInterface2();
  36 
  37     public Private_PublicClass[]          ac1 = new Private_PublicClass[0];
  38     public Private_PublicInterface[]      ac2 = new Private_PublicInterface[0];
  39     public Private_PrivateInterface1[]    ac3 = new Private_PrivateInterface1[0];
  40     public Private_PrivateInterface2[]    ac4 = new Private_PrivateInterface2[0];
  41 
  42     public Public_PublicClass[]           ac5 = new Public_PublicClass[0];
  43     public Public_PublicInterface[]       ac6 = new Public_PublicInterface[0];
  44     public Public_PrivateInterface1[]     ac7 = new Public_PrivateInterface1[0];
  45     public Public_PrivateInterface2[]     ac8 = new Public_PrivateInterface2[0];
  46 
  47     public Private_PublicClass[][]       aac1 = new Private_PublicClass[0][];
  48     public Private_PublicInterface[][]   aac2 = new Private_PublicInterface[0][];
  49     public Private_PrivateInterface1[][] aac3 = new Private_PrivateInterface1[0][];
  50     public Private_PrivateInterface2[][] aac4 = new Private_PrivateInterface2[0][];
  51 
  52     public Public_PublicClass[][]        aac5 = new Public_PublicClass[0][];
  53     public Public_PublicInterface[][]    aac6 = new Public_PublicInterface[0][];
  54     public Public_PrivateInterface1[][]  aac7 = new Public_PrivateInterface1[0][];
  55     public Public_PrivateInterface2[][]  aac8 = new Public_PrivateInterface2[0][];
  56 
  57     public PublicInterface                 i1 = new Private_PublicInterface();
  58     public PrivateInterface1               i2 = new Private_PrivateInterface1();
  59     public PrivateInterface2               i3 = new Private_PrivateInterface2();
  60 
  61     public PublicInterface[]              ai1 = new Private_PublicInterface[0];
  62     public PrivateInterface1[]            ai2 = new Private_PrivateInterface1[0];
  63     public PrivateInterface2[]            ai3 = new Private_PrivateInterface2[0];
  64 
  65     public PublicInterface[][]           aai1 = new Private_PublicInterface[0][];
  66     public PrivateInterface1[][]         aai2 = new Private_PrivateInterface1[0][];
  67     public PrivateInterface2[][]         aai3 = new Private_PrivateInterface2[0][];
  68 }
  69 
  70 interface PrivateInterface1 {
  71 }
  72 
  73 interface PrivateInterface2 extends PublicInterface {
  74 }
  75 
  76 class Private_PublicClass extends PublicClass {
  77     public String toString() {
  78         return "passed";
  79     }
  80 }
  81 
  82 class Private_PublicInterface implements PublicInterface {
  83     public String toString() {
  84         return "passed";
  85     }
  86 }
  87 
  88 class Private_PrivateInterface1 implements PrivateInterface1 {
  89     public String toString() {
  90         return "passed";
  91     }
  92 }
  93 
  94 class Private_PrivateInterface2 implements PrivateInterface2 {
  95     public String toString() {
  96         return "passed";
  97     }
  98 }