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 // NestHost attribute refers to class with no nest
  25 
  26 class TestNestmateMembership$TargetNotOurHost {
  27   0xCAFEBABE;
  28   0; // minor version
  29   54; // version
  30   [] { // Constant Pool
  31     ; // first element is empty
  32     Method #6 #18; // #1
  33     Field #19 #20; // #2
  34     String #21; // #3
  35     Method #22 #23; // #4
  36     class #24; // #5
  37     class #27; // #6
  38     Utf8 "f"; // #7
  39     Utf8 "I"; // #8
  40     Utf8 "<init>"; // #9
  41     Utf8 "()V"; // #10
  42     Utf8 "Code"; // #11
  43     Utf8 "LineNumberTable"; // #12
  44     Utf8 "m"; // #13
  45     Utf8 "SourceFile"; // #14
  46     Utf8 "TestNestmateMembership.java"; // #15
  47     Utf8 "NestHost"; // #16
  48     class #28; // #17
  49     NameAndType #9 #10; // #18
  50     class #29; // #19
  51     NameAndType #30 #31; // #20
  52     Utf8 "TargetNotOurHost.m() - java version"; // #21
  53     class #32; // #22
  54     NameAndType #33 #34; // #23
  55     Utf8 "TestNestmateMembership$TargetNotOurHost"; // #24
  56     Utf8 "TargetNotOurHost"; // #25
  57     Utf8 "InnerClasses"; // #26
  58     Utf8 "java/lang/Object"; // #27
  59     Utf8 "TestNestmateMembership"; // #28
  60     Utf8 "java/lang/System"; // #29
  61     Utf8 "out"; // #30
  62     Utf8 "Ljava/io/PrintStream;"; // #31
  63     Utf8 "java/io/PrintStream"; // #32
  64     Utf8 "println"; // #33
  65     Utf8 "(Ljava/lang/String;)V"; // #34
  66     //  Added
  67     Utf8 "InvalidNestHost"; // #35
  68     class #35; // #36
  69   } // Constant Pool
  70 
  71   0x0020; // access
  72   #5;// this_cpx
  73   #6;// super_cpx
  74 
  75   [] { // Interfaces
  76   } // Interfaces
  77 
  78   [] { // fields
  79     { // Member
  80       0x000A; // access
  81       #7; // name_cpx
  82       #8; // sig_cpx
  83       [] { // Attributes
  84       } // Attributes
  85     } // Member
  86   } // fields
  87 
  88   [] { // methods
  89     { // Member
  90       0x0002; // access
  91       #9; // name_cpx
  92       #10; // sig_cpx
  93       [] { // Attributes
  94         Attr(#11) { // Code
  95           1; // max_stack
  96           1; // max_locals
  97           Bytes[]{
  98             0x2AB70001B1;
  99           };
 100           [] { // Traps
 101           } // end Traps
 102           [] { // Attributes
 103             Attr(#12) { // LineNumberTable
 104               [] { // LineNumberTable
 105                 0  371;
 106               }
 107             } // end LineNumberTable
 108           } // Attributes
 109         } // end Code
 110       } // Attributes
 111     } // Member
 112     ;
 113     { // Member
 114       0x000A; // access
 115       #13; // name_cpx
 116       #10; // sig_cpx
 117       [] { // Attributes
 118         Attr(#11) { // Code
 119           2; // max_stack
 120           0; // max_locals
 121           Bytes[]{
 122             0xB200021203B60004;
 123             0xB1;
 124           };
 125           [] { // Traps
 126           } // end Traps
 127           [] { // Attributes
 128             Attr(#12) { // LineNumberTable
 129               [] { // LineNumberTable
 130                 0  374;
 131                 8  375;
 132               }
 133             } // end LineNumberTable
 134           } // Attributes
 135         } // end Code
 136       } // Attributes
 137     } // Member
 138   } // methods
 139 
 140   [] { // Attributes
 141     Attr(#14) { // SourceFile
 142       #15;
 143     } // end SourceFile
 144     ;
 145     Attr(#16) { // NestHost
 146       0x0024; // modified - #36
 147     } // end NestHost
 148     ;
 149     Attr(#26) { // InnerClasses
 150       [] { // InnerClasses
 151         #5 #17 #25 8;
 152       }
 153     } // end InnerClasses
 154   } // Attributes
 155 } // end class TestNestmateMembership$TargetNotOurHost