1 /*
  2  * Copyright (c) 2022, 2024, 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  class ValueClassExtendingIdentityClass {
 26   0xCAFEBABE;
 27   0; // minor version
 28   66; // version
 29   [] { // Constant Pool
 30     ; // first element is empty
 31     class #2; // #1
 32     Utf8 "ValueClassExtendingIdentityClass"; // #2
 33     class #4; // #3
 34     Utf8 "IdentityAbstract"; // #4
 35     Utf8 "<vnew>"; // #5
 36     Utf8 "()LValueClassExtendingIdentityClass;"; // #6
 37     Utf8 "Code"; // #7
 38     Utf8 "LineNumberTable"; // #8
 39     Utf8 "SourceFile"; // #9
 40     Utf8 "ValueClassExtendingIdentityClass.java"; // #10
 41   } // Constant Pool
 42 
 43   0x0050; // access
 44   #1;// this_cpx
 45   #3;// super_cpx
 46 
 47   [] { // Interfaces
 48   } // Interfaces
 49 
 50   [] { // Fields
 51   } // Fields
 52 
 53   [] { // Methods
 54     {  // method
 55       0x0008; // access
 56       #5; // name_index
 57       #6; // descriptor_index
 58       [] { // Attributes
 59         Attr(#7) { // Code
 60           1; // max_stack
 61           1; // max_locals
 62           Bytes[]{
 63             0xCB00014B2AB0;
 64           }
 65           [] { // Traps
 66           } // end Traps
 67           [] { // Attributes
 68             Attr(#8) { // LineNumberTable
 69               [] { // line_number_table
 70                 0  1;
 71               }
 72             } // end LineNumberTable
 73           } // Attributes
 74         } // end Code
 75       } // Attributes
 76     }
 77   } // Methods
 78 
 79   [] { // Attributes
 80     Attr(#9) { // SourceFile
 81       #10;
 82     } // end SourceFile
 83   } // Attributes
 84 } // end class ValueClassExtendingIdentityClass
 85 
 86 class ValueClassExtendingAbstractClassWithField {
 87   0xCAFEBABE;
 88   0; // minor version
 89   66; // version
 90   [] { // Constant Pool
 91     ; // first element is empty
 92     class #2; // #1
 93     Utf8 "ValueClassExtendingAbstractClassWithField"; // #2
 94     class #4; // #3
 95     Utf8 "AbstractWithField"; // #4
 96     Utf8 "<vnew>"; // #5
 97     Utf8 "()LValueClassExtendingAbstractClassWithField;"; // #6
 98     Utf8 "Code"; // #7
 99     Utf8 "LineNumberTable"; // #8
100     Utf8 "SourceFile"; // #9
101     Utf8 "ValueClassExtendingAbstractClassWithField.java"; // #10
102   } // Constant Pool
103 
104   0x0050; // access
105   #1;// this_cpx
106   #3;// super_cpx
107 
108   [] { // Interfaces
109   } // Interfaces
110 
111   [] { // Fields
112   } // Fields
113 
114   [] { // Methods
115     {  // method
116       0x0008; // access
117       #5; // name_index
118       #6; // descriptor_index
119       [] { // Attributes
120         Attr(#7) { // Code
121           1; // max_stack
122           1; // max_locals
123           Bytes[]{
124             0xCB00014B2AB0;
125           }
126           [] { // Traps
127           } // end Traps
128           [] { // Attributes
129             Attr(#8) { // LineNumberTable
130               [] { // line_number_table
131                 0  1;
132               }
133             } // end LineNumberTable
134           } // Attributes
135         } // end Code
136       } // Attributes
137     }
138   } // Methods
139 
140   [] { // Attributes
141     Attr(#9) { // SourceFile
142       #10;
143     } // end SourceFile
144   } // Attributes
145 } // end class ValueClassExtendingAbstractClassWithField
146 
147 class ValueClassExtendingAbstractClassWithSynchMethod {
148   0xCAFEBABE;
149   0; // minor version
150   66; // version
151   [] { // Constant Pool
152     ; // first element is empty
153     class #2; // #1
154     Utf8 "ValueClassExtendingAbstractClassWithSynchMethod"; // #2
155     class #4; // #3
156     Utf8 "AbstractWithSynchMethod"; // #4
157     Utf8 "<vnew>"; // #5
158     Utf8 "()LValueClassExtendingAbstractClassWithSynchMethod;"; // #6
159     Utf8 "Code"; // #7
160     Utf8 "LineNumberTable"; // #8
161     Utf8 "SourceFile"; // #9
162     Utf8 "ValueClassExtendingAbstractClassWithSynchMethod.java"; // #10
163   } // Constant Pool
164 
165   0x0050; // access
166   #1;// this_cpx
167   #3;// super_cpx
168 
169   [] { // Interfaces
170   } // Interfaces
171 
172   [] { // Fields
173   } // Fields
174 
175   [] { // Methods
176     {  // method
177       0x0008; // access
178       #5; // name_index
179       #6; // descriptor_index
180       [] { // Attributes
181         Attr(#7) { // Code
182           1; // max_stack
183           1; // max_locals
184           Bytes[]{
185             0xCB00014B2AB0;
186           }
187           [] { // Traps
188           } // end Traps
189           [] { // Attributes
190             Attr(#8) { // LineNumberTable
191               [] { // line_number_table
192                 0  1;
193               }
194             } // end LineNumberTable
195           } // Attributes
196         } // end Code
197       } // Attributes
198     }
199   } // Methods
200 
201   [] { // Attributes
202     Attr(#9) { // SourceFile
203       #10;
204     } // end SourceFile
205   } // Attributes
206 } // end class ValueClassExtendingAbstractClassWithSynchMethod
207 
208 class ValueClassImplementingIdentityInterface {
209   0xCAFEBABE;
210   0; // minor version
211   66; // version
212   [] { // Constant Pool
213     ; // first element is empty
214     class #2; // #1
215     Utf8 "ValueClassImplementingIdentityInterface"; // #2
216     class #4; // #3
217     Utf8 "java/lang/Object"; // #4
218     class #6; // #5
219     Utf8 "IdentityInterface"; // #6
220     Utf8 "<vnew>"; // #7
221     Utf8 "()LValueClassImplementingIdentityInterface;"; // #8
222     Utf8 "Code"; // #9
223     Utf8 "LineNumberTable"; // #10
224     Utf8 "SourceFile"; // #11
225     Utf8 "ValueClassImplementingIdentityInterface.java"; // #12
226   } // Constant Pool
227 
228   0x0050; // access
229   #1;// this_cpx
230   #3;// super_cpx
231 
232   [] { // Interfaces
233     #5;
234   } // Interfaces
235 
236   [] { // Fields
237   } // Fields
238 
239   [] { // Methods
240     {  // method
241       0x0008; // access
242       #7; // name_index
243       #8; // descriptor_index
244       [] { // Attributes
245         Attr(#9) { // Code
246           1; // max_stack
247           1; // max_locals
248           Bytes[]{
249             0xCB00014B2AB0;
250           }
251           [] { // Traps
252           } // end Traps
253           [] { // Attributes
254             Attr(#10) { // LineNumberTable
255               [] { // line_number_table
256                 0  1;
257               }
258             } // end LineNumberTable
259           } // Attributes
260         } // end Code
261       } // Attributes
262     }
263   } // Methods
264 
265   [] { // Attributes
266     Attr(#11) { // SourceFile
267       #12;
268     } // end SourceFile
269   } // Attributes
270 } // end class ValueClassImplementingIdentityInterface
271 
272 class IdentityClassExtendingValueClass {
273   0xCAFEBABE;
274   0; // minor version
275   66; // version
276   [] { // Constant Pool
277     ; // first element is empty
278     Method #2 #3; // #1
279     class #4; // #2
280     NameAndType #5 #6; // #3
281     Utf8 "ValueAbstract"; // #4
282     Utf8 "<init>"; // #5
283     Utf8 "()V"; // #6
284     class #8; // #7
285     Utf8 "IdentityClassExtendingValueClass"; // #8
286     Utf8 "Code"; // #9
287     Utf8 "LineNumberTable"; // #10
288     Utf8 "SourceFile"; // #11
289     Utf8 "IdentityClassExtendingValueClass.java"; // #12
290   } // Constant Pool
291 
292   0x0020; // access
293   #7;// this_cpx
294   #2;// super_cpx
295 
296   [] { // Interfaces
297   } // Interfaces
298 
299   [] { // Fields
300   } // Fields
301 
302   [] { // Methods
303     {  // method
304       0x0000; // access
305       #5; // name_index
306       #6; // descriptor_index
307       [] { // Attributes
308         Attr(#9) { // Code
309           1; // max_stack
310           1; // max_locals
311           Bytes[]{
312             0x2AB70001B1;
313           }
314           [] { // Traps
315           } // end Traps
316           [] { // Attributes
317             Attr(#10) { // LineNumberTable
318               [] { // line_number_table
319                 0  1;
320               }
321             } // end LineNumberTable
322           } // Attributes
323         } // end Code
324       } // Attributes
325     }
326   } // Methods
327 
328   [] { // Attributes
329     Attr(#11) { // SourceFile
330       #12;
331     } // end SourceFile
332   } // Attributes
333 } // end class IdentityClassExtendingValueClass
334 
335 class IdentityClassImplementingValueInterface {
336   0xCAFEBABE;
337   0; // minor version
338   66; // version
339   [] { // Constant Pool
340     ; // first element is empty
341     Method #2 #3; // #1
342     class #4; // #2
343     NameAndType #5 #6; // #3
344     Utf8 "java/lang/Object"; // #4
345     Utf8 "<init>"; // #5
346     Utf8 "()V"; // #6
347     class #8; // #7
348     Utf8 "IdentityClassImplementingValueInterface"; // #8
349     class #10; // #9
350     Utf8 "ValueInterface"; // #10
351     Utf8 "Code"; // #11
352     Utf8 "LineNumberTable"; // #12
353     Utf8 "SourceFile"; // #13
354     Utf8 "IdentityClassImplementingValueInterface.java"; // #14
355   } // Constant Pool
356 
357   0x0020; // access
358   #7;// this_cpx
359   #2;// super_cpx
360 
361   [] { // Interfaces
362     #9;
363   } // Interfaces
364 
365   [] { // Fields
366   } // Fields
367 
368   [] { // Methods
369     {  // method
370       0x0000; // access
371       #5; // name_index
372       #6; // descriptor_index
373       [] { // Attributes
374         Attr(#11) { // Code
375           1; // max_stack
376           1; // max_locals
377           Bytes[]{
378             0x2AB70001B1;
379           }
380           [] { // Traps
381           } // end Traps
382           [] { // Attributes
383             Attr(#12) { // LineNumberTable
384               [] { // line_number_table
385                 0  1;
386               }
387             } // end LineNumberTable
388           } // Attributes
389         } // end Code
390       } // Attributes
391     }
392   } // Methods
393 
394   [] { // Attributes
395     Attr(#13) { // SourceFile
396       #14;
397     } // end SourceFile
398   } // Attributes
399 } // end class IdentityClassImplementingValueInterface
400 
401 class AbstractClassWithFieldExtendingValueClass {
402   0xCAFEBABE;
403   0; // minor version
404   66; // version
405   [] { // Constant Pool
406     ; // first element is empty
407     Method #2 #3; // #1
408     class #4; // #2
409     NameAndType #5 #6; // #3
410     Utf8 "ValueAbstract"; // #4
411     Utf8 "<init>"; // #5
412     Utf8 "()V"; // #6
413     class #8; // #7
414     Utf8 "AbstractClassWithFieldExtendingValueClass"; // #8
415     Utf8 "i"; // #9
416     Utf8 "I"; // #10
417     Utf8 "Code"; // #11
418     Utf8 "LineNumberTable"; // #12
419     Utf8 "SourceFile"; // #13
420     Utf8 "AbstractClassWithFieldExtendingValueClass.java"; // #14
421   } // Constant Pool
422 
423   0x0420; // access
424   #7;// this_cpx
425   #2;// super_cpx
426 
427   [] { // Interfaces
428   } // Interfaces
429 
430   [] { // Fields
431     {  // field
432       0x0000; // access
433       #9; // name_index
434       #10; // descriptor_index
435       [] { // Attributes
436       } // Attributes
437     }
438   } // Fields
439 
440   [] { // Methods
441     {  // method
442       0x0000; // access
443       #5; // name_index
444       #6; // descriptor_index
445       [] { // Attributes
446         Attr(#11) { // Code
447           1; // max_stack
448           1; // max_locals
449           Bytes[]{
450             0x2AB70001B1;
451           }
452           [] { // Traps
453           } // end Traps
454           [] { // Attributes
455             Attr(#12) { // LineNumberTable
456               [] { // line_number_table
457                 0  1;
458               }
459             } // end LineNumberTable
460           } // Attributes
461         } // end Code
462       } // Attributes
463     }
464   } // Methods
465 
466   [] { // Attributes
467     Attr(#13) { // SourceFile
468       #14;
469     } // end SourceFile
470   } // Attributes
471 } // end class AbstractClassWithFieldExtendingValueClass
472 
473 class AbstractClassWithFieldImplementingValueInterface {
474   0xCAFEBABE;
475   0; // minor version
476   66; // version
477   [] { // Constant Pool
478     ; // first element is empty
479     Method #2 #3; // #1
480     class #4; // #2
481     NameAndType #5 #6; // #3
482     Utf8 "java/lang/Object"; // #4
483     Utf8 "<init>"; // #5
484     Utf8 "()V"; // #6
485     class #8; // #7
486     Utf8 "AbstractClassWithFieldImplementingValueInterface"; // #8
487     class #10; // #9
488     Utf8 "ValueInterface"; // #10
489     Utf8 "i"; // #11
490     Utf8 "I"; // #12
491     Utf8 "Code"; // #13
492     Utf8 "LineNumberTable"; // #14
493     Utf8 "SourceFile"; // #15
494     Utf8 "AbstractClassWithFieldImplementingValueInterface.java"; // #16
495   } // Constant Pool
496 
497   0x0420; // access
498   #7;// this_cpx
499   #2;// super_cpx
500 
501   [] { // Interfaces
502     #9;
503   } // Interfaces
504 
505   [] { // Fields
506     {  // field
507       0x0000; // access
508       #11; // name_index
509       #12; // descriptor_index
510       [] { // Attributes
511       } // Attributes
512     }
513   } // Fields
514 
515   [] { // Methods
516     {  // method
517       0x0000; // access
518       #5; // name_index
519       #6; // descriptor_index
520       [] { // Attributes
521         Attr(#13) { // Code
522           1; // max_stack
523           1; // max_locals
524           Bytes[]{
525             0x2AB70001B1;
526           }
527           [] { // Traps
528           } // end Traps
529           [] { // Attributes
530             Attr(#14) { // LineNumberTable
531               [] { // line_number_table
532                 0  1;
533               }
534             } // end LineNumberTable
535           } // Attributes
536         } // end Code
537       } // Attributes
538     }
539   } // Methods
540 
541   [] { // Attributes
542     Attr(#15) { // SourceFile
543       #16;
544     } // end SourceFile
545   } // Attributes
546 } // end class AbstractClassWithFieldImplementingValueInterface
547 
548 class AbstractClassWithFieldWithNoIdentityModifier {
549   0xCAFEBABE;
550   0; // minor version
551   66; // version
552   [] { // Constant Pool
553     ; // first element is empty
554     Method #2 #3; // #1
555     class #4; // #2
556     NameAndType #5 #6; // #3
557     Utf8 "java/lang/Object"; // #4
558     Utf8 "<init>"; // #5
559     Utf8 "()V"; // #6
560     class #8; // #7
561     Utf8 "AbstractClassWithFieldWithNoIdentityModifier"; // #8
562     Utf8 "i"; // #9
563     Utf8 "I"; // #10
564     Utf8 "Code"; // #11
565     Utf8 "LineNumberTable"; // #12
566     Utf8 "SourceFile"; // #13
567     Utf8 "AbstractClassWithFieldWithNoIdentityModifier.java"; // #14
568   } // Constant Pool
569 
570   0x0400; // access
571   #7;// this_cpx
572   #2;// super_cpx
573 
574   [] { // Interfaces
575   } // Interfaces
576 
577   [] { // Fields
578     {  // field
579       0x0000; // access
580       #9; // name_index
581       #10; // descriptor_index
582       [] { // Attributes
583       } // Attributes
584     }
585   } // Fields
586 
587   [] { // Methods
588     {  // method
589       0x0000; // access
590       #5; // name_index
591       #6; // descriptor_index
592       [] { // Attributes
593         Attr(#11) { // Code
594           1; // max_stack
595           1; // max_locals
596           Bytes[]{
597             0x2AB70001B1;
598           }
599           [] { // Traps
600           } // end Traps
601           [] { // Attributes
602             Attr(#12) { // LineNumberTable
603               [] { // line_number_table
604                 0  1;
605               }
606             } // end LineNumberTable
607           } // Attributes
608         } // end Code
609       } // Attributes
610     }
611   } // Methods
612 
613   [] { // Attributes
614     Attr(#13) { // SourceFile
615       #14;
616     } // end SourceFile
617   } // Attributes
618 } // end class AbstractClassWithFieldWithNoIdentityModifier
619 
620 class AbstractClassWithSynchMethodWithNoIdentityModifier {
621   0xCAFEBABE;
622   0; // minor version
623   66; // version
624   [] { // Constant Pool
625     ; // first element is empty
626     Method #2 #3; // #1
627     class #4; // #2
628     NameAndType #5 #6; // #3
629     Utf8 "java/lang/Object"; // #4
630     Utf8 "<init>"; // #5
631     Utf8 "()V"; // #6
632     class #8; // #7
633     Utf8 "AbstractClassWithSynchMethodWithNoIdentityModifier"; // #8
634     Utf8 "Code"; // #9
635     Utf8 "LineNumberTable"; // #10
636     Utf8 "foo"; // #11
637     Utf8 "SourceFile"; // #12
638     Utf8 "AbstractClassWithSynchMethodWithNoIdentityModifier.java"; // #13
639   } // Constant Pool
640 
641   0x0400; // access
642   #7;// this_cpx
643   #2;// super_cpx
644 
645   [] { // Interfaces
646   } // Interfaces
647 
648   [] { // Fields
649   } // Fields
650 
651   [] { // Methods
652     {  // method
653       0x0000; // access
654       #5; // name_index
655       #6; // descriptor_index
656       [] { // Attributes
657         Attr(#9) { // Code
658           1; // max_stack
659           1; // max_locals
660           Bytes[]{
661             0x2AB70001B1;
662           }
663           [] { // Traps
664           } // end Traps
665           [] { // Attributes
666             Attr(#10) { // LineNumberTable
667               [] { // line_number_table
668                 0  1;
669               }
670             } // end LineNumberTable
671           } // Attributes
672         } // end Code
673       } // Attributes
674     }
675     ;
676     {  // method
677       0x0020; // access
678       #11; // name_index
679       #6; // descriptor_index
680       [] { // Attributes
681         Attr(#9) { // Code
682           0; // max_stack
683           1; // max_locals
684           Bytes[]{
685             0xB1;
686           }
687           [] { // Traps
688           } // end Traps
689           [] { // Attributes
690             Attr(#10) { // LineNumberTable
691               [] { // line_number_table
692                 0  2;
693               }
694             } // end LineNumberTable
695           } // Attributes
696         } // end Code
697       } // Attributes
698     }
699   } // Methods
700 
701   [] { // Attributes
702     Attr(#12) { // SourceFile
703       #13;
704     } // end SourceFile
705   } // Attributes
706 } // end class AbstractClassWithSynchMethodWithNoIdentityModifier
707 
708 class AbstractClassWithBothModifiers {
709   0xCAFEBABE;
710   0; // minor version
711   66; // version
712   [] { // Constant Pool
713     ; // first element is empty
714     Method #2 #3; // #1
715     class #4; // #2
716     NameAndType #5 #6; // #3
717     Utf8 "java/lang/Object"; // #4
718     Utf8 "<init>"; // #5
719     Utf8 "()V"; // #6
720     class #8; // #7
721     Utf8 "AbstractClassWithBothModifiers"; // #8
722     Utf8 "Code"; // #9
723     Utf8 "LineNumberTable"; // #10
724     Utf8 "SourceFile"; // #11
725     Utf8 "AbstractClassWithBothModifiers.java"; // #12
726   } // Constant Pool
727 
728   0x0460; // access
729   #7;// this_cpx
730   #2;// super_cpx
731 
732   [] { // Interfaces
733   } // Interfaces
734 
735   [] { // Fields
736   } // Fields
737 
738   [] { // Methods
739     {  // method
740       0x0000; // access
741       #5; // name_index
742       #6; // descriptor_index
743       [] { // Attributes
744         Attr(#9) { // Code
745           1; // max_stack
746           1; // max_locals
747           Bytes[]{
748             0x2AB70001B1;
749           }
750           [] { // Traps
751           } // end Traps
752           [] { // Attributes
753             Attr(#10) { // LineNumberTable
754               [] { // line_number_table
755                 0  1;
756               }
757             } // end LineNumberTable
758           } // Attributes
759         } // end Code
760       } // Attributes
761     }
762   } // Methods
763 
764   [] { // Attributes
765     Attr(#11) { // SourceFile
766       #12;
767     } // end SourceFile
768   } // Attributes
769 } // end class AbstractClassWithBothModifiers
770 
771 class ConcreteClassWithNoModifiers {
772   0xCAFEBABE;
773   0; // minor version
774   66; // version
775   [] { // Constant Pool
776     ; // first element is empty
777     Method #2 #3; // #1
778     class #4; // #2
779     NameAndType #5 #6; // #3
780     Utf8 "java/lang/Object"; // #4
781     Utf8 "<init>"; // #5
782     Utf8 "()V"; // #6
783     class #8; // #7
784     Utf8 "ConcreteClassWithNoModifiers"; // #8
785     Utf8 "Code"; // #9
786     Utf8 "LineNumberTable"; // #10
787     Utf8 "SourceFile"; // #11
788     Utf8 "ConcreteClassWithNoModifiers.java"; // #12
789   } // Constant Pool
790 
791   0x0000; // access
792   #7;// this_cpx
793   #2;// super_cpx
794 
795   [] { // Interfaces
796   } // Interfaces
797 
798   [] { // Fields
799   } // Fields
800 
801   [] { // Methods
802     {  // method
803       0x0000; // access
804       #5; // name_index
805       #6; // descriptor_index
806       [] { // Attributes
807         Attr(#9) { // Code
808           1; // max_stack
809           1; // max_locals
810           Bytes[]{
811             0x2AB70001B1;
812           }
813           [] { // Traps
814           } // end Traps
815           [] { // Attributes
816             Attr(#10) { // LineNumberTable
817               [] { // line_number_table
818                 0  1;
819               }
820             } // end LineNumberTable
821           } // Attributes
822         } // end Code
823       } // Attributes
824     }
825   } // Methods
826 
827   [] { // Attributes
828     Attr(#11) { // SourceFile
829       #12;
830     } // end SourceFile
831   } // Attributes
832 } // end class ConcreteClassWithNoModifiers