/* * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ // This file contains multiple illegal value type classes that should cause // ClassFormatError exceptions when attempted to be loaded. // // The .jcod classes were originally generated from this Java file and then // modified to cause ClassFormatError or ClassCircularityError exceptions. The // '(bad)' comments in most of the tests show where the modifications were made. // // final __ByValue class Value { // static final Value VT = makeValue(0x01234567); // final int int_v; // Value() { // int_v = 1; // } // static Value makeValue(int x) { // Value v = __MakeDefault Value(); // v = __WithField(v.int_v, x); // return v; // } // } // Test that class modifiers cannot have both ACC_VALUE and ACC_ABSTRATCT set. // class ValueAbstract { 0xCAFEBABE; 0; // minor version 55; // version [28] { // Constant Pool ; // first element is empty Method #7 #23; // #1 at 0x0A Field #3 #24; // #2 at 0x0F class #9; // #3 at 0x14 int 0x01234567; // #4 at 0x17 Method #3 #25; // #5 at 0x1C Field #3 #26; // #6 at 0x21 class #27; // #7 at 0x26 Utf8 "VT"; // #8 at 0x29 Utf8 "ValueAbstract"; // #9 at 0x2E Utf8 "ValueTypes"; // #10 at 0x36 Utf8 "LValueAbstract;"; // #11 at 0x43 Utf8 "int_v"; // #12 at 0x4D Utf8 "I"; // #13 at 0x55 Utf8 ""; // #14 at 0x59 Utf8 "()V"; // #15 at 0x62 Utf8 "Code"; // #16 at 0x68 Utf8 "LineNumberTable"; // #17 at 0x6F Utf8 "makeValueAbstract"; // #18 at 0x81 Utf8 "(I)LValueAbstract;"; // #19 at 0x8D Utf8 ""; // #20 at 0x9A Utf8 "SourceFile"; // #21 at 0xA5 Utf8 "ValueAbstract.java"; // #22 at 0xB2 NameAndType #14 #15; // #23 at 0xBF NameAndType #12 #13; // #24 at 0xC4 NameAndType #18 #19; // #25 at 0xC9 NameAndType #8 #11; // #26 at 0xCE Utf8 "java/lang/Object"; // #27 at 0xD3 } // Constant Pool 0x0530; // access [ ACC_VALUE ACC_ABSTRACT(bad) ACC_SUPER ACC_FINAL ] #3;// this_cpx #7;// super_cpx [0] { // Interfaces } // Interfaces [2] { // fields { // Member at 0xF0 0x0118; // access #8; // name_cpx #11; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0xF8 0x0010; // access #12; // name_cpx #13; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [3] { // methods { // Member at 0x0102 0x0000; // access #14; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 42) { // Code at 0x010A 2; // max_stack 1; // max_locals Bytes[10]{ 0x2AB700012A04B500; 0x02B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x0126 [3] { // LineNumberTable 0 4; // at 0x0132 4 5; // at 0x0136 9 6; // at 0x013A } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x013A 0x0008; // access #18; // name_cpx #19; // sig_cpx [1] { // Attributes Attr(#16, 44) { // Code at 0x0142 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00034C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x0160 [3] { // LineNumberTable 0 8; // at 0x016C 4 9; // at 0x0170 10 10; // at 0x0174 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x0174 0x0008; // access #20; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 33) { // Code at 0x017C 1; // max_stack 0; // max_locals Bytes[9]{ 0x1204B80005B30006; 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 6) { // LineNumberTable at 0x0197 [1] { // LineNumberTable 0 2; // at 0x01A3 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#21, 2) { // SourceFile at 0x01A5 #22; } // end SourceFile ; Attr(#10, 4) { // ValueTypes at 0x01AD 0x00010003; } // end ValueTypes } // Attributes } // end class ValueAbstract ////////////////////////////////////////////////////////////////////// // Test that class modifiers cannot have both ACC_VALUE and ACC_ENUM set. // class ValueEnum { 0xCAFEBABE; 0; // minor version 55; // version [28] { // Constant Pool ; // first element is empty Method #7 #23; // #1 at 0x0A Field #3 #24; // #2 at 0x0F class #9; // #3 at 0x14 int 0x01234567; // #4 at 0x17 Method #3 #25; // #5 at 0x1C Field #3 #26; // #6 at 0x21 class #27; // #7 at 0x26 Utf8 "VT"; // #8 at 0x29 Utf8 "ValueEnum"; // #9 at 0x2E Utf8 "ValueTypes"; // #10 at 0x36 Utf8 "LValueEnum;"; // #11 at 0x43 Utf8 "int_v"; // #12 at 0x4D Utf8 "I"; // #13 at 0x55 Utf8 ""; // #14 at 0x59 Utf8 "()V"; // #15 at 0x62 Utf8 "Code"; // #16 at 0x68 Utf8 "LineNumberTable"; // #17 at 0x6F Utf8 "makeValueEnum"; // #18 at 0x81 Utf8 "(I)LValueEnum;"; // #19 at 0x8D Utf8 ""; // #20 at 0x9A Utf8 "SourceFile"; // #21 at 0xA5 Utf8 "ValueEnum.java"; // #22 at 0xB2 NameAndType #14 #15; // #23 at 0xBF NameAndType #12 #13; // #24 at 0xC4 NameAndType #18 #19; // #25 at 0xC9 NameAndType #8 #11; // #26 at 0xCE Utf8 "java/lang/Object"; // #27 at 0xD3 } // Constant Pool 0x04130; // access [ ACC_VALUE ACC_ENUM(bad) ACC_SUPER ACC_FINAL ] #3;// this_cpx #7;// super_cpx [0] { // Interfaces } // Interfaces [2] { // fields { // Member at 0xF0 0x0118; // access #8; // name_cpx #11; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0xF8 0x0010; // access #12; // name_cpx #13; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [3] { // methods { // Member at 0x0102 0x0000; // access #14; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 42) { // Code at 0x010A 2; // max_stack 1; // max_locals Bytes[10]{ 0x2AB700012A04B500; 0x02B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x0126 [3] { // LineNumberTable 0 4; // at 0x0132 4 5; // at 0x0136 9 6; // at 0x013A } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x013A 0x0008; // access #18; // name_cpx #19; // sig_cpx [1] { // Attributes Attr(#16, 44) { // Code at 0x0142 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00034C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x0160 [3] { // LineNumberTable 0 8; // at 0x016C 4 9; // at 0x0170 10 10; // at 0x0174 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x0174 0x0008; // access #20; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 33) { // Code at 0x017C 1; // max_stack 0; // max_locals Bytes[9]{ 0x1204B80005B30006; 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 6) { // LineNumberTable at 0x0197 [1] { // LineNumberTable 0 2; // at 0x01A3 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#21, 2) { // SourceFile at 0x01A5 #22; } // end SourceFile ; Attr(#10, 4) { // ValueTypes at 0x01AD 0x00010003; } // end ValueTypes } // Attributes } // end class ValueEnum ////////////////////////////////////////////////////////////////////// // Test that value type fields must be final. // class ValueFieldNotFinal { 0xCAFEBABE; 0; // minor version 55; // version [28] { // Constant Pool ; // first element is empty Method #7 #23; // #1 at 0x0A Field #3 #24; // #2 at 0x0F class #9; // #3 at 0x14 int 0x01234567; // #4 at 0x17 Method #3 #25; // #5 at 0x1C Field #3 #26; // #6 at 0x21 class #27; // #7 at 0x26 Utf8 "VT"; // #8 at 0x29 Utf8 "ValueFieldNotFinal"; // #9 at 0x2E Utf8 "ValueTypes"; // #10 at 0x36 Utf8 "LValueFieldNotFinal;"; // #11 at 0x43 Utf8 "int_v"; // #12 at 0x4D Utf8 "I"; // #13 at 0x55 Utf8 ""; // #14 at 0x59 Utf8 "()V"; // #15 at 0x62 Utf8 "Code"; // #16 at 0x68 Utf8 "LineNumberTable"; // #17 at 0x6F Utf8 "makeValueFieldNotFinal"; // #18 at 0x81 Utf8 "(I)LValueFieldNotFinal;"; // #19 at 0x8D Utf8 ""; // #20 at 0x9A Utf8 "SourceFile"; // #21 at 0xA5 Utf8 "ValueFieldNotFinal.java"; // #22 at 0xB2 NameAndType #14 #15; // #23 at 0xBF NameAndType #12 #13; // #24 at 0xC4 NameAndType #18 #19; // #25 at 0xC9 NameAndType #8 #11; // #26 at 0xCE Utf8 "java/lang/Object"; // #27 at 0xD3 } // Constant Pool 0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ] #3;// this_cpx #7;// super_cpx [0] { // Interfaces } // Interfaces [2] { // fields { // Member at 0xF0 0x0118; // access #8; // name_cpx #11; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0xF8 0x0000; // access [ Field not ACC_FINAL(bad) ] #12; // name_cpx #13; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [3] { // methods { // Member at 0x0102 0x0000; // access #14; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 42) { // Code at 0x010A 2; // max_stack 1; // max_locals Bytes[10]{ 0x2AB700012A04B500; 0x02B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x0126 [3] { // LineNumberTable 0 4; // at 0x0132 4 5; // at 0x0136 9 6; // at 0x013A } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x013A 0x0008; // access #18; // name_cpx #19; // sig_cpx [1] { // Attributes Attr(#16, 44) { // Code at 0x0142 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00034C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x0160 [3] { // LineNumberTable 0 8; // at 0x016C 4 9; // at 0x0170 10 10; // at 0x0174 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x0174 0x0008; // access #20; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 33) { // Code at 0x017C 1; // max_stack 0; // max_locals Bytes[9]{ 0x1204B80005B30006; 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 6) { // LineNumberTable at 0x0197 [1] { // LineNumberTable 0 2; // at 0x01A3 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#21, 2) { // SourceFile at 0x01A5 #22; } // end SourceFile ; Attr(#10, 4) { // ValueTypes at 0x01AD 0x00010003; } // end ValueTypes } // Attributes } // end class ValueFieldNotFinal ////////////////////////////////////////////////////////////////////// // Test that arrays cannot have ACC_FLATTENABLE set. // class ValueFlatArray { 0xCAFEBABE; 0; // minor version 55; // version [32] { // Constant Pool ; // first element is empty Method #8 #26; // #1 at 0x0A Field #4 #27; // #2 at 0x0F Field #4 #28; // #3 at 0x14 class #10; // #4 at 0x19 int 0x01234567; // #5 at 0x1C Method #4 #29; // #6 at 0x21 Field #4 #30; // #7 at 0x26 class #31; // #8 at 0x2B Utf8 "VT"; // #9 at 0x2E Utf8 "ValueFlatArray"; // #10 at 0x33 Utf8 "ValueTypes"; // #11 at 0x40 Utf8 "LValueFlatArray;"; // #12 at 0x4D Utf8 "int_v"; // #13 at 0x5C Utf8 "I"; // #14 at 0x64 Utf8 "int_a"; // #15 at 0x68 Utf8 "[I"; // #16 at 0x70 Utf8 ""; // #17 at 0x75 Utf8 "()V"; // #18 at 0x7E Utf8 "Code"; // #19 at 0x84 Utf8 "LineNumberTable"; // #20 at 0x8B Utf8 "makeValueFlatArray"; // #21 at 0x9D Utf8 "(I)LValueFlatArray;"; // #22 at 0xAE Utf8 ""; // #23 at 0xC0 Utf8 "SourceFile"; // #24 at 0xCB Utf8 "ValueFlatArray.java"; // #25 at 0xD8 NameAndType #17 #18; // #26 at 0xEA NameAndType #13 #14; // #27 at 0xEF NameAndType #15 #16; // #28 at 0xF4 NameAndType #21 #22; // #29 at 0xF9 NameAndType #9 #12; // #30 at 0xFE Utf8 "java/lang/Object"; // #31 at 0x0103 } // Constant Pool 0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ] #4;// this_cpx #8;// super_cpx [0] { // Interfaces } // Interfaces [3] { // fields { // Member at 0x0120 0x0118; // access #9; // name_cpx #12; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x0128 0x0010; // access #13; // name_cpx #14; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x0130 0x0110; // access // access [ ACC_FINAL ACC_FLATTENABLE(bad) ] #15; // name_cpx #16; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [3] { // methods { // Member at 0x013A 0x0000; // access #17; // name_cpx #18; // sig_cpx [1] { // Attributes Attr(#19, 51) { // Code at 0x0142 2; // max_stack 1; // max_locals Bytes[15]{ 0x2AB700012A04B500; 0x022A01B50003B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#20, 18) { // LineNumberTable at 0x0163 [4] { // LineNumberTable 0 5; // at 0x016F 4 6; // at 0x0173 9 7; // at 0x0177 14 8; // at 0x017B } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x017B 0x0008; // access #21; // name_cpx #22; // sig_cpx [1] { // Attributes Attr(#19, 44) { // Code at 0x0183 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00044C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#20, 14) { // LineNumberTable at 0x01A1 [3] { // LineNumberTable 0 10; // at 0x01AD 4 11; // at 0x01B1 10 12; // at 0x01B5 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x01B5 0x0008; // access #23; // name_cpx #18; // sig_cpx [1] { // Attributes Attr(#19, 33) { // Code at 0x01BD 1; // max_stack 0; // max_locals Bytes[9]{ 0x1205B80006B30007; 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#20, 6) { // LineNumberTable at 0x01D8 [1] { // LineNumberTable 0 2; // at 0x01E4 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#24, 2) { // SourceFile at 0x01E6 #25; } // end SourceFile ; Attr(#11, 4) { // ValueTypes at 0x01EE 0x00010004; } // end ValueTypes } // Attributes } // end class ValueFlatArray ////////////////////////////////////////////////////////////////////// // Test that a value type cannot have a method named . // class ValueInitMethod { 0xCAFEBABE; 0; // minor version 55; // version [28] { // Constant Pool ; // first element is empty Method #7 #23; // #1 at 0x0A Field #3 #24; // #2 at 0x0F class #9; // #3 at 0x14 int 0x01234567; // #4 at 0x17 Method #3 #25; // #5 at 0x1C Field #3 #26; // #6 at 0x21 class #27; // #7 at 0x26 Utf8 "VT"; // #8 at 0x29 Utf8 "ValueInitMethod"; // #9 at 0x2E Utf8 "ValueTypes"; // #10 at 0x36 Utf8 "LValueInitMethod;"; // #11 at 0x43 Utf8 "int_v"; // #12 at 0x4D Utf8 "I"; // #13 at 0x55 Utf8 ""; // #14 at 0x59 Utf8 "()V"; // #15 at 0x62 Utf8 "Code"; // #16 at 0x68 Utf8 "LineNumberTable"; // #17 at 0x6F Utf8 "makeValueInitMethod"; // #18 at 0x81 Utf8 "(I)LValueInitMethod;"; // #19 at 0x8D Utf8 ""; // #20 at 0x9A Utf8 "SourceFile"; // #21 at 0xA5 Utf8 "ValueInitMethod.java"; // #22 at 0xB2 NameAndType #14 #15; // #23 at 0xBF NameAndType #12 #13; // #24 at 0xC4 NameAndType #18 #19; // #25 at 0xC9 NameAndType #8 #11; // #26 at 0xCE Utf8 "java/lang/Object"; // #27 at 0xD3 } // Constant Pool 0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ] #3;// this_cpx #7;// super_cpx [0] { // Interfaces } // Interfaces [2] { // fields { // Member at 0xF0 0x0118; // access #8; // name_cpx #11; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0xF8 0x0010; // access #12; // name_cpx #13; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [3] { // methods { // Member at 0x0102 0x0000; // access #14; // name_cpx (bad) #15; // sig_cpx [1] { // Attributes Attr(#16, 42) { // Code at 0x010A 2; // max_stack 1; // max_locals Bytes[10]{ 0x2AB700012A04B500; 0x02B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x0126 [3] { // LineNumberTable 0 4; // at 0x0132 4 5; // at 0x0136 9 6; // at 0x013A } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x013A 0x0008; // access #18; // name_cpx #19; // sig_cpx [1] { // Attributes Attr(#16, 44) { // Code at 0x0142 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00034C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x0160 [3] { // LineNumberTable 0 8; // at 0x016C 4 9; // at 0x0170 10 10; // at 0x0174 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x0174 0x0008; // access #20; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 33) { // Code at 0x017C 1; // max_stack 0; // max_locals Bytes[9]{ 0x1204B80005B30006; 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 6) { // LineNumberTable at 0x0197 [1] { // LineNumberTable 0 2; // at 0x01A3 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#21, 2) { // SourceFile at 0x01A5 #22; } // end SourceFile ; Attr(#10, 4) { // ValueTypes at 0x01AD 0x00010003; } // end ValueTypes } // Attributes } // end class ValueInitMethod ////////////////////////////////////////////////////////////////////// // Test that class modifiers cannot have both ACC_VALUE and ACC_INTERFACE set. // class ValueInterface { 0xCAFEBABE; 0; // minor version 55; // version [27] { // Constant Pool ; // first element is empty Method #7 #21; // #1 at 0x0A Field #3 #22; // #2 at 0x0F class #23; // #3 at 0x14 int 0x01234567; // #4 at 0x17 Method #3 #24; // #5 at 0x1C Field #3 #25; // #6 at 0x21 class #26; // #7 at 0x26 Utf8 "VT"; // #8 at 0x29 Utf8 "LValueInterface;"; // #9 at 0x2E Utf8 "int_v"; // #10 at 0x3C Utf8 "I"; // #11 at 0x44 Utf8 ""; // #12 at 0x48 Utf8 "()V"; // #13 at 0x51 Utf8 "Code"; // #14 at 0x57 Utf8 "LineNumberTable"; // #15 at 0x5E Utf8 "makeValueInterface"; // #16 at 0x70 Utf8 "(I)LValueInterface;"; // #17 at 0x80 Utf8 ""; // #18 at 0x91 Utf8 "SourceFile"; // #19 at 0x9C Utf8 "ValueInterface.java"; // #20 at 0xA9 NameAndType #12 #13; // #21 at 0xBA NameAndType #10 #11; // #22 at 0xBF Utf8 "ValueInterface"; // #23 at 0xC4 NameAndType #16 #17; // #24 at 0xD0 NameAndType #8 #9; // #25 at 0xD5 Utf8 "java/lang/Object"; // #26 at 0xDA } // Constant Pool 0x0330; // access [ ACC_VALUE ACC_INTERFACE(bad) ACC_SUPER ACC_FINAL ] #3;// this_cpx #7;// super_cpx [0] { // Interfaces } // Interfaces [2] { // fields { // Member at 0xF7 0x0018; // access #8; // name_cpx #9; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0xFF 0x0010; // access #10; // name_cpx #11; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [1] { // methods { // Member at 0x0141 0x0008; // access #16; // name_cpx #17; // sig_cpx [1] { // Attributes Attr(#14, 44) { // Code at 0x0149 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00034C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#15, 14) { // LineNumberTable at 0x0167 [3] { // LineNumberTable 0 8; // at 0x0173 4 9; // at 0x0177 10 10; // at 0x017B } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [1] { // Attributes Attr(#19, 2) { // SourceFile at 0x01AC #20; } // end SourceFile } // Attributes } // end class ValueInterface ////////////////////////////////////////////////////////////////////// // Test that value type instance methods cannot be synchronized. // class ValueMethodSynch { 0xCAFEBABE; 0; // minor version 55; // version [29] { // Constant Pool ; // first element is empty Method #7 #24; // #1 at 0x0A Field #3 #25; // #2 at 0x0F class #9; // #3 at 0x14 int 0x01234567; // #4 at 0x17 Method #3 #26; // #5 at 0x1C Field #3 #27; // #6 at 0x21 class #28; // #7 at 0x26 Utf8 "VT"; // #8 at 0x29 Utf8 "ValueMethodSynch"; // #9 at 0x2E Utf8 "ValueTypes"; // #10 at 0x41 Utf8 "LValueMethodSynch;"; // #11 at 0x4E Utf8 "int_v"; // #12 at 0x63 Utf8 "I"; // #13 at 0x6B Utf8 ""; // #14 at 0x6F Utf8 "()V"; // #15 at 0x78 Utf8 "Code"; // #16 at 0x7E Utf8 "LineNumberTable"; // #17 at 0x85 Utf8 "instanceMethod"; // #18 at 0x97 Utf8 "makeValueMethodSynch"; // #19 at 0xA8 Utf8 "(I)LValueMethodSynch;"; // #20 at 0xBF Utf8 ""; // #21 at 0xD7 Utf8 "SourceFile"; // #22 at 0xE2 Utf8 "ValueMethodSynch.java"; // #23 at 0xEF NameAndType #14 #15; // #24 at 0x0107 NameAndType #12 #13; // #25 at 0x010C NameAndType #19 #20; // #26 at 0x0111 NameAndType #8 #11; // #27 at 0x0116 Utf8 "java/lang/Object"; // #28 at 0x011B } // Constant Pool 0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ] #3;// this_cpx #7;// super_cpx [0] { // Interfaces } // Interfaces [2] { // fields { // Member at 0x0138 0x0118; // access #8; // name_cpx #11; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x0140 0x0010; // access #12; // name_cpx #13; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [4] { // methods { // Member at 0x014A 0x0000; // access #14; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 42) { // Code at 0x0152 2; // max_stack 1; // max_locals Bytes[10]{ 0x2AB700012A04B500; 0x02B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x016E [3] { // LineNumberTable 0 4; // at 0x017A 4 5; // at 0x017E 9 6; // at 0x0182 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x0182 0x0020; // access [ ACC_SYNCHRONIZED(bad) ] #18; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 25) { // Code at 0x018A 0; // max_stack 1; // max_locals Bytes[1]{ 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 6) { // LineNumberTable at 0x019D [1] { // LineNumberTable 0 8; // at 0x01A9 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x01A9 0x0008; // access #19; // name_cpx #20; // sig_cpx [1] { // Attributes Attr(#16, 44) { // Code at 0x01B1 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00034C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x01CF [3] { // LineNumberTable 0 11; // at 0x01DB 4 12; // at 0x01DF 10 13; // at 0x01E3 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x01E3 0x0008; // access #21; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 33) { // Code at 0x01EB 1; // max_stack 0; // max_locals Bytes[9]{ 0x1204B80005B30006; 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 6) { // LineNumberTable at 0x0206 [1] { // LineNumberTable 0 2; // at 0x0212 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#22, 2) { // SourceFile at 0x0214 #23; } // end SourceFile ; Attr(#10, 4) { // ValueTypes at 0x021C 0x00010003; } // end ValueTypes } // Attributes } // end class ValueMethodSynch ////////////////////////////////////////////////////////////////////// // Test that a value type's super class must be java.lang.Object. // class ValueSuperClass { 0xCAFEBABE; 0; // minor version 55; // version [30] { // Constant Pool ; // first element is empty Method #7 #23; // #1 at 0x0A Field #3 #24; // #2 at 0x0F class #9; // #3 at 0x14 int 0x01234567; // #4 at 0x17 Method #3 #25; // #5 at 0x1C Field #3 #26; // #6 at 0x21 class #27; // #7 at 0x26 Utf8 "VT"; // #8 at 0x29 Utf8 "ValueSuperClass"; // #9 at 0x2E Utf8 "ValueTypes"; // #10 at 0x36 Utf8 "LValueSuperClass;"; // #11 at 0x43 Utf8 "int_v"; // #12 at 0x4D Utf8 "I"; // #13 at 0x55 Utf8 ""; // #14 at 0x59 Utf8 "()V"; // #15 at 0x62 Utf8 "Code"; // #16 at 0x68 Utf8 "LineNumberTable"; // #17 at 0x6F Utf8 "makeValueSuperClass"; // #18 at 0x81 Utf8 "(I)LValueSuperClass;"; // #19 at 0x8D Utf8 ""; // #20 at 0x9A Utf8 "SourceFile"; // #21 at 0xA5 Utf8 "ValueSuperClass.java"; // #22 at 0xB2 NameAndType #14 #15; // #23 at 0xBF NameAndType #12 #13; // #24 at 0xC4 NameAndType #18 #19; // #25 at 0xC9 NameAndType #8 #11; // #26 at 0xCE Utf8 "java/lang/Object"; // #27 at 0xD3 class #29; // #28 Utf8 "java/lang/Throwable"; // #29 } // Constant Pool 0x0130; // access [ ACC_SUPER ACC_FINAL ] #3;// this_cpx #28;// super_cpx [0] { // Interfaces } // Interfaces [2] { // fields { // Member at 0xF0 0x0118; // access #8; // name_cpx #11; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0xF8 0x0010; // access #12; // name_cpx #13; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [3] { // methods { // Member at 0x0102 0x0000; // access #14; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 42) { // Code at 0x010A 2; // max_stack 1; // max_locals Bytes[10]{ 0x2AB700012A04B500; 0x02B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x0126 [3] { // LineNumberTable 0 4; // at 0x0132 4 5; // at 0x0136 9 6; // at 0x013A } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x013A 0x0008; // access #18; // name_cpx #19; // sig_cpx [1] { // Attributes Attr(#16, 44) { // Code at 0x0142 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00034C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 14) { // LineNumberTable at 0x0160 [3] { // LineNumberTable 0 8; // at 0x016C 4 9; // at 0x0170 10 10; // at 0x0174 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x0174 0x0008; // access #20; // name_cpx #15; // sig_cpx [1] { // Attributes Attr(#16, 33) { // Code at 0x017C 1; // max_stack 0; // max_locals Bytes[9]{ 0x1204B80005B30006; 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#17, 6) { // LineNumberTable at 0x0197 [1] { // LineNumberTable 0 2; // at 0x01A3 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#21, 2) { // SourceFile at 0x01A5 #22; } // end SourceFile ; Attr(#10, 4) { // ValueTypes at 0x01AD 0x00010003; } // end ValueTypes } // Attributes } // end class ValueSuperClass ////////////////////////////////////////////////////////////////////// // Value types Circ and Circ2 have fields of each other's type. This should // cause a ClassCircularityError exception when one of them is being loaded. // // The value types are based on these two Java classes: // // final __ByValue class Circ { // static final Circ VT = makeCirc(0x01234567); // final int int_v; // __Flattenable final Circ2 v2; // Circ() { // int_v = 1; // v2 = __MakeDefault Circ2(); // } // static Circ makeCirc(int x) { // Circ v = __MakeDefault Circ(); // v = __WithField(v.int_v, x); // return v; // } // } //---------------------------------------------------------------- // final __ByValue class Circ2 { // static final Circ2 VT = makeCirc2('\u0123'); // final char char_v; // __Flattenable final Circ vv; // Circ2() { // char_v = 'z'; // vv = __MakeDefault Circ(); // } // static Circ2 makeCirc2(char c) { // Circ2 v = __MakeDefault Circ2(); // v = __WithField(v.char_v, c); // return v; // } // } class Circ { 0xCAFEBABE; 0; // minor version 55; // version [34] { // Constant Pool ; // first element is empty Method #9 #28; // #1 at 0x0A Field #5 #29; // #2 at 0x0F class #17; // #3 at 0x14 Field #5 #30; // #4 at 0x17 class #11; // #5 at 0x1C int 0x01234567; // #6 at 0x1F Method #5 #31; // #7 at 0x24 Field #5 #32; // #8 at 0x29 class #33; // #9 at 0x2E Utf8 "VT"; // #10 at 0x31 Utf8 "Circ"; // #11 at 0x36 Utf8 "ValueTypes"; // #12 at 0x3D Utf8 "LCirc;"; // #13 at 0x4A Utf8 "int_v"; // #14 at 0x53 Utf8 "I"; // #15 at 0x5B Utf8 "v2"; // #16 at 0x5F Utf8 "Circ2"; // #17 at 0x64 Utf8 "LCirc2;"; // #18 at 0x6C Utf8 ""; // #19 at 0x76 Utf8 "()V"; // #20 at 0x7F Utf8 "Code"; // #21 at 0x85 Utf8 "LineNumberTable"; // #22 at 0x8C Utf8 "makeCirc"; // #23 at 0x9E Utf8 "(I)LCirc;"; // #24 at 0xA9 Utf8 ""; // #25 at 0xB5 Utf8 "SourceFile"; // #26 at 0xC0 Utf8 "Circ.java"; // #27 at 0xCD NameAndType #19 #20; // #28 at 0xD9 NameAndType #14 #15; // #29 at 0xDE NameAndType #16 #18; // #30 at 0xE3 NameAndType #23 #24; // #31 at 0xE8 NameAndType #10 #13; // #32 at 0xED Utf8 "java/lang/Object"; // #33 at 0xF2 } // Constant Pool 0x0130; // access [ ACC_SUPER ACC_FINAL ] #5;// this_cpx #9;// super_cpx [0] { // Interfaces } // Interfaces [3] { // fields { // Member at 0x010F 0x0118; // access #10; // name_cpx #13; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x0117 0x0010; // access #14; // name_cpx #15; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x011F 0x0110; // access #16; // name_cpx #18; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [3] { // methods { // Member at 0x0129 0x0000; // access #19; // name_cpx #20; // sig_cpx [1] { // Attributes Attr(#21, 53) { // Code at 0x0131 2; // max_stack 1; // max_locals Bytes[17]{ 0x2AB700012A04B500; 0x022ACB0003B50004; 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#22, 18) { // LineNumberTable at 0x0154 [4] { // LineNumberTable 0 5; // at 0x0160 4 6; // at 0x0164 9 7; // at 0x0168 16 8; // at 0x016C } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x016C 0x0008; // access #23; // name_cpx #24; // sig_cpx [1] { // Attributes Attr(#21, 44) { // Code at 0x0174 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00054C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#22, 14) { // LineNumberTable at 0x0192 [3] { // LineNumberTable 0 10; // at 0x019E 4 11; // at 0x01A2 10 12; // at 0x01A6 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x01A6 0x0008; // access #25; // name_cpx #20; // sig_cpx [1] { // Attributes Attr(#21, 33) { // Code at 0x01AE 1; // max_stack 0; // max_locals Bytes[9]{ 0x1206B80007B30008; 0xB1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#22, 6) { // LineNumberTable at 0x01C9 [1] { // LineNumberTable 0 2; // at 0x01D5 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#26, 2) { // SourceFile at 0x01D7 #27; } // end SourceFile ; Attr(#12, 6) { // ValueTypes at 0x01DF 0x000200050003; } // end ValueTypes } // Attributes } // end class Circ class Circ2 { 0xCAFEBABE; 0; // minor version 55; // version [33] { // Constant Pool ; // first element is empty Method #8 #27; // #1 at 0x0A Field #5 #28; // #2 at 0x0F class #16; // #3 at 0x14 Field #5 #29; // #4 at 0x17 class #10; // #5 at 0x1C Method #5 #30; // #6 at 0x1F Field #5 #31; // #7 at 0x24 class #32; // #8 at 0x29 Utf8 "VT"; // #9 at 0x2C Utf8 "Circ2"; // #10 at 0x31 Utf8 "ValueTypes"; // #11 at 0x39 Utf8 "LCirc2;"; // #12 at 0x46 Utf8 "char_v"; // #13 at 0x50 Utf8 "C"; // #14 at 0x59 Utf8 "vv"; // #15 at 0x5D Utf8 "Circ"; // #16 at 0x62 Utf8 "LCirc;"; // #17 at 0x69 Utf8 ""; // #18 at 0x72 Utf8 "()V"; // #19 at 0x7B Utf8 "Code"; // #20 at 0x81 Utf8 "LineNumberTable"; // #21 at 0x88 Utf8 "makeCirc2"; // #22 at 0x9A Utf8 "(C)LCirc2;"; // #23 at 0xA6 Utf8 ""; // #24 at 0xB3 Utf8 "SourceFile"; // #25 at 0xBE Utf8 "Circ2.java"; // #26 at 0xCB NameAndType #18 #19; // #27 at 0xD8 NameAndType #13 #14; // #28 at 0xDD NameAndType #15 #17; // #29 at 0xE2 NameAndType #22 #23; // #30 at 0xE7 NameAndType #9 #12; // #31 at 0xEC Utf8 "java/lang/Object"; // #32 at 0xF1 } // Constant Pool 0x0130; // access [ ACC_SUPER ACC_FINAL ] #5;// this_cpx #8;// super_cpx [0] { // Interfaces } // Interfaces [3] { // fields { // Member at 0x010E 0x0118; // access #9; // name_cpx #12; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x0116 0x0010; // access #13; // name_cpx #14; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x011E 0x0110; // access #15; // name_cpx #17; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [3] { // methods { // Member at 0x0128 0x0000; // access #18; // name_cpx #19; // sig_cpx [1] { // Attributes Attr(#20, 54) { // Code at 0x0130 2; // max_stack 1; // max_locals Bytes[18]{ 0x2AB700012A107AB5; 0x00022ACB0003B500; 0x04B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#21, 18) { // LineNumberTable at 0x0154 [4] { // LineNumberTable 0 5; // at 0x0160 4 6; // at 0x0164 10 7; // at 0x0168 17 8; // at 0x016C } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x016C 0x0008; // access #22; // name_cpx #23; // sig_cpx [1] { // Attributes Attr(#20, 44) { // Code at 0x0174 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00054C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#21, 14) { // LineNumberTable at 0x0192 [3] { // LineNumberTable 0 10; // at 0x019E 4 11; // at 0x01A2 10 12; // at 0x01A6 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x01A6 0x0008; // access #24; // name_cpx #19; // sig_cpx [1] { // Attributes Attr(#20, 34) { // Code at 0x01AE 1; // max_stack 0; // max_locals Bytes[10]{ 0x110123B80006B300; 0x07B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#21, 6) { // LineNumberTable at 0x01CA [1] { // LineNumberTable 0 2; // at 0x01D6 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#25, 2) { // SourceFile at 0x01D8 #26; } // end SourceFile ; Attr(#11, 6) { // ValueTypes at 0x01E0 0x000200030005; } // end ValueTypes } // Attributes } // end class Circ2 ////////////////////////////////////////////////////////////////////// // Value types CircStaticA and CircStaticB have static fields of each other's // type. This should cause a ClassCircularityError exception when one of them // is being loaded. // // The value types are based on these two Java classes: // // final __ByValue class CircStaticA { // static final CircStaticA VT = makeCircStaticA(0x01234567); // final int int_v; // __Flattenable static final CircStaticB v2 = __MakeDefault CircStaticB(); // CircStaticA() { // int_v = 1; // } // static CircStaticA makeCircStaticA(int x) { // CircStaticA v = __MakeDefault CircStaticA(); // v = __WithField(v.int_v, x); // return v; // } // } //---------------------------------------------------------------- // final __ByValue class CircStaticB { // static final CircStaticB VT = makeCircStaticB(0x01234567); // final int int_v; // __Flattenable static final CircStaticA v2 = __MakeDefault CircStaticA(); // CircStaticB() { // int_v = 1; // } // static CircStaticB makeCircStaticB(int x) { // CircStaticB v = __MakeDefault CircStaticB(); // v = __WithField(v.int_v, x); // return v; // } // } class CircStaticA { 0xCAFEBABE; 0; // minor version 55; // version [34] { // Constant Pool ; // first element is empty Method #9 #28; // #1 at 0x0A Field #3 #29; // #2 at 0x0F class #11; // #3 at 0x14 int 0x01234567; // #4 at 0x17 Method #3 #30; // #5 at 0x1C Field #3 #31; // #6 at 0x21 class #17; // #7 at 0x26 Field #3 #32; // #8 at 0x29 class #33; // #9 at 0x2E Utf8 "VT"; // #10 at 0x31 Utf8 "CircStaticA"; // #11 at 0x36 Utf8 "ValueTypes"; // #12 at 0x44 Utf8 "LCircStaticA;"; // #13 at 0x51 Utf8 "int_v"; // #14 at 0x61 Utf8 "I"; // #15 at 0x69 Utf8 "v2"; // #16 at 0x6D Utf8 "CircStaticB"; // #17 at 0x72 Utf8 "LCircStaticB;"; // #18 at 0x80 Utf8 ""; // #19 at 0x90 Utf8 "()V"; // #20 at 0x99 Utf8 "Code"; // #21 at 0x9F Utf8 "LineNumberTable"; // #22 at 0xA6 Utf8 "makeCircStaticA"; // #23 at 0xB8 Utf8 "(I)LCircStaticA;"; // #24 at 0xCA Utf8 ""; // #25 at 0xDD Utf8 "SourceFile"; // #26 at 0xE8 Utf8 "CircStaticA.java"; // #27 at 0xF5 NameAndType #19 #20; // #28 at 0x0108 NameAndType #14 #15; // #29 at 0x010D NameAndType #23 #24; // #30 at 0x0112 NameAndType #10 #13; // #31 at 0x0117 NameAndType #16 #18; // #32 at 0x011C Utf8 "java/lang/Object"; // #33 at 0x0121 } // Constant Pool 0x0130; // access [ ACC_SUPER ACC_FINAL ] #3;// this_cpx #9;// super_cpx [0] { // Interfaces } // Interfaces [3] { // fields { // Member at 0x013E 0x0118; // access #10; // name_cpx #13; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x0146 0x0010; // access #14; // name_cpx #15; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x014E 0x0118; // access #16; // name_cpx #18; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [3] { // methods { // Member at 0x0158 0x0000; // access #19; // name_cpx #20; // sig_cpx [1] { // Attributes Attr(#21, 42) { // Code at 0x0160 2; // max_stack 1; // max_locals Bytes[10]{ 0x2AB700012A04B500; 0x02B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#22, 14) { // LineNumberTable at 0x017C [3] { // LineNumberTable 0 5; // at 0x0188 4 6; // at 0x018C 9 7; // at 0x0190 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x0190 0x0008; // access #23; // name_cpx #24; // sig_cpx [1] { // Attributes Attr(#21, 44) { // Code at 0x0198 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00034C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#22, 14) { // LineNumberTable at 0x01B6 [3] { // LineNumberTable 0 9; // at 0x01C2 4 10; // at 0x01C6 10 11; // at 0x01CA } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x01CA 0x0008; // access #25; // name_cpx #20; // sig_cpx [1] { // Attributes Attr(#21, 43) { // Code at 0x01D2 1; // max_stack 0; // max_locals Bytes[15]{ 0x1204B80005B30006; 0xCB0007B30008B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#22, 10) { // LineNumberTable at 0x01F3 [2] { // LineNumberTable 0 2; // at 0x01FF 8 4; // at 0x0203 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#26, 2) { // SourceFile at 0x0205 #27; } // end SourceFile ; Attr(#12, 6) { // ValueTypes at 0x020D 0x000200030007; } // end ValueTypes } // Attributes } // end class CircStaticA class CircStaticB { 0xCAFEBABE; 0; // minor version 55; // version [34] { // Constant Pool ; // first element is empty Method #9 #28; // #1 at 0x0A Field #3 #29; // #2 at 0x0F class #11; // #3 at 0x14 int 0x01234567; // #4 at 0x17 Method #3 #30; // #5 at 0x1C Field #3 #31; // #6 at 0x21 class #17; // #7 at 0x26 Field #3 #32; // #8 at 0x29 class #33; // #9 at 0x2E Utf8 "VT"; // #10 at 0x31 Utf8 "CircStaticB"; // #11 at 0x36 Utf8 "ValueTypes"; // #12 at 0x44 Utf8 "LCircStaticB;"; // #13 at 0x51 Utf8 "int_v"; // #14 at 0x61 Utf8 "I"; // #15 at 0x69 Utf8 "v2"; // #16 at 0x6D Utf8 "CircStaticA"; // #17 at 0x72 Utf8 "LCircStaticA;"; // #18 at 0x80 Utf8 ""; // #19 at 0x90 Utf8 "()V"; // #20 at 0x99 Utf8 "Code"; // #21 at 0x9F Utf8 "LineNumberTable"; // #22 at 0xA6 Utf8 "makeCircStaticB"; // #23 at 0xB8 Utf8 "(I)LCircStaticB;"; // #24 at 0xCA Utf8 ""; // #25 at 0xDD Utf8 "SourceFile"; // #26 at 0xE8 Utf8 "CircStaticB.java"; // #27 at 0xF5 NameAndType #19 #20; // #28 at 0x0108 NameAndType #14 #15; // #29 at 0x010D NameAndType #23 #24; // #30 at 0x0112 NameAndType #10 #13; // #31 at 0x0117 NameAndType #16 #18; // #32 at 0x011C Utf8 "java/lang/Object"; // #33 at 0x0121 } // Constant Pool 0x0130; // access [ ACC_SUPER ACC_FINAL ] #3;// this_cpx #9;// super_cpx [0] { // Interfaces } // Interfaces [3] { // fields { // Member at 0x013E 0x0118; // access #10; // name_cpx #13; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x0146 0x0010; // access #14; // name_cpx #15; // sig_cpx [0] { // Attributes } // Attributes } // Member ; { // Member at 0x014E 0x0118; // access #16; // name_cpx #18; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [3] { // methods { // Member at 0x0158 0x0000; // access #19; // name_cpx #20; // sig_cpx [1] { // Attributes Attr(#21, 42) { // Code at 0x0160 2; // max_stack 1; // max_locals Bytes[10]{ 0x2AB700012A04B500; 0x02B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#22, 14) { // LineNumberTable at 0x017C [3] { // LineNumberTable 0 5; // at 0x0188 4 6; // at 0x018C 9 7; // at 0x0190 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x0190 0x0008; // access #23; // name_cpx #24; // sig_cpx [1] { // Attributes Attr(#21, 44) { // Code at 0x0198 2; // max_stack 2; // max_locals Bytes[12]{ 0xCB00034C2B1ACC00; 0x024C2BB0; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#22, 14) { // LineNumberTable at 0x01B6 [3] { // LineNumberTable 0 9; // at 0x01C2 4 10; // at 0x01C6 10 11; // at 0x01CA } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member ; { // Member at 0x01CA 0x0008; // access #25; // name_cpx #20; // sig_cpx [1] { // Attributes Attr(#21, 43) { // Code at 0x01D2 1; // max_stack 0; // max_locals Bytes[15]{ 0x1204B80005B30006; 0xCB0007B30008B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#22, 10) { // LineNumberTable at 0x01F3 [2] { // LineNumberTable 0 2; // at 0x01FF 8 4; // at 0x0203 } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#26, 2) { // SourceFile at 0x0205 #27; } // end SourceFile ; Attr(#12, 6) { // ValueTypes at 0x020D 0x000200070003; } // end ValueTypes } // Attributes } // end class CircStaticB ////////////////////////////////////////////////////////////////////// // Test that a value type cannot be Cloneable. // // final __ByValue class ValueCloneable implements Cloneable { // final int field; // private ValueCloneable() { field = 0; } //} class ValueCloneable { 0xCAFEBABE; 0; // minor version 55; // version [20] { // Constant Pool ; // first element is empty Method #4 #14; // #1 at 0x0A Field #3 #15; // #2 at 0x0F class #16; // #3 at 0x14 class #18; // #4 at 0x17 class #19; // #5 at 0x1A Utf8 "field"; // #6 at 0x1D Utf8 "I"; // #7 at 0x25 Utf8 ""; // #8 at 0x29 Utf8 "()V"; // #9 at 0x32 Utf8 "Code"; // #10 at 0x38 Utf8 "LineNumberTable"; // #11 at 0x3F Utf8 "SourceFile"; // #12 at 0x51 Utf8 "ValueCloneable.java"; // #13 at 0x5E NameAndType #8 #9; // #14 at 0x74 NameAndType #6 #7; // #15 at 0x79 Utf8 "ValueCloneable"; // #16 at 0x7E Utf8 "ValueTypes"; // #17 at 0x8F Utf8 "java/lang/Object"; // #18 at 0x9C Utf8 "java/lang/Cloneable"; // #19 at 0xAF } // Constant Pool 0x0130; // access [ ACC_SUPER ACC_FINAL ] #3;// this_cpx #4;// super_cpx [1] { // Interfaces #5; } // Interfaces [1] { // fields { // Member at 0xD1 0x0010; // access #6; // name_cpx #7; // sig_cpx [0] { // Attributes } // Attributes } // Member } // fields [1] { // methods { // Member at 0xDB 0x0002; // access #8; // name_cpx #9; // sig_cpx [1] { // Attributes Attr(#10, 34) { // Code at 0xE3 2; // max_stack 1; // max_locals Bytes[10]{ 0x2AB700012A03B500; 0x02B1; }; [0] { // Traps } // end Traps [1] { // Attributes Attr(#11, 6) { // LineNumberTable at 0xFF [1] { // LineNumberTable 0 3; // at 0x010B } } // end LineNumberTable } // Attributes } // end Code } // Attributes } // Member } // methods [2] { // Attributes Attr(#12, 2) { // SourceFile at 0x010D #13; } // end SourceFile ; Attr(#17, 4) { // ValueTypes at 0x0115 0x00010003; } // end ValueTypes } // Attributes } // end class ValueCloneable