1 /* 2 * Copyright (c) 2015, 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 /* 25 * This class consists of the following java code, but has an illegal class 26 * access_flags value of 0x8000, that should be ignored by the JVM because 27 * the class file version is < 53. 28 * 29 * public class acc_module { 30 * public static void main(String[] args) { 31 * System.out.println("hello"); 32 * } 33 * } 34 */ 35 class acc_module { 36 0xCAFEBABE; 37 0; // minor version 38 52; // version 39 [29] { // Constant Pool 40 ; // first element is empty 41 Method #6 #15; // #1 at 0x0A 42 Field #16 #17; // #2 at 0x0F 43 String #18; // #3 at 0x14 44 Method #19 #20; // #4 at 0x17 45 class #21; // #5 at 0x1C 46 class #22; // #6 at 0x1F 47 Utf8 "<init>"; // #7 at 0x22 48 Utf8 "()V"; // #8 at 0x2B 49 Utf8 "Code"; // #9 at 0x31 50 Utf8 "LineNumberTable"; // #10 at 0x38 51 Utf8 "main"; // #11 at 0x4A 52 Utf8 "([Ljava/lang/String;)V"; // #12 at 0x51 53 Utf8 "SourceFile"; // #13 at 0x6A 54 Utf8 "acc_module.java"; // #14 at 0x77 55 NameAndType #7 #8; // #15 at 0x89 56 class #23; // #16 at 0x8E 57 NameAndType #24 #25; // #17 at 0x91 58 Utf8 "hello"; // #18 at 0x96 59 class #26; // #19 at 0x9E 60 NameAndType #27 #28; // #20 at 0xA1 61 Utf8 "acc_module"; // #21 at 0xA6 62 Utf8 "java/lang/Object"; // #22 at 0xB3 63 Utf8 "java/lang/System"; // #23 at 0xC6 64 Utf8 "out"; // #24 at 0xD9 65 Utf8 "Ljava/io/PrintStream;"; // #25 at 0xDF 66 Utf8 "java/io/PrintStream"; // #26 at 0xF7 67 Utf8 "println"; // #27 at 0x010D 68 Utf8 "(Ljava/lang/String;)V"; // #28 at 0x0117 69 } // Constant Pool 70 71 0x8000; // access 72 #5;// this_cpx 73 #6;// super_cpx 74 75 [0] { // Interfaces 76 } // Interfaces 77 78 [0] { // fields 79 } // fields 80 81 [2] { // methods 82 { // Member at 0x013B 83 0x0001; // access 84 #7; // name_cpx 85 #8; // sig_cpx 86 [1] { // Attributes 87 Attr(#9, 29) { // Code at 0x0143 88 1; // max_stack 89 1; // max_locals 90 Bytes[5]{ 91 0x2AB70001B1; 92 }; 93 [0] { // Traps 94 } // end Traps 95 [1] { // Attributes 96 Attr(#10, 6) { // LineNumberTable at 0x015A 97 [1] { // LineNumberTable 98 0 1; // at 0x0166 99 } 100 } // end LineNumberTable 101 } // Attributes 102 } // end Code 103 } // Attributes 104 } // Member 105 ; 106 { // Member at 0x0166 107 0x0009; // access 108 #11; // name_cpx 109 #12; // sig_cpx 110 [1] { // Attributes 111 Attr(#9, 37) { // Code at 0x016E 112 2; // max_stack 113 1; // max_locals 114 Bytes[9]{ 115 0xB200021203B60004; 116 0xB1; 117 }; 118 [0] { // Traps 119 } // end Traps 120 [1] { // Attributes 121 Attr(#10, 10) { // LineNumberTable at 0x0189 122 [2] { // LineNumberTable 123 0 3; // at 0x0195 124 8 4; // at 0x0199 125 } 126 } // end LineNumberTable 127 } // Attributes 128 } // end Code 129 } // Attributes 130 } // Member 131 } // methods 132 133 [1] { // Attributes 134 Attr(#13, 2) { // SourceFile at 0x019B 135 #14; 136 } // end SourceFile 137 } // Attributes 138 } // end class acc_module