1 /*
   2  * Copyright (c) 2018, 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 // This class has an unknown attribute called UnknownAttr.Added.  The
  25 // attribute should be ignored by the JVM.
  26 //
  27 class UnknownAttr { 
  28   0xCAFEBABE; 
  29   0; // minor version 
  30   55; // version 
  31   [] { // Constant Pool 
  32     ; // first element is empty 
  33     class #2; // #1 
  34     Utf8 "UnknownAttr"; // #2 
  35     class #4; // #3 
  36     Utf8 "java/lang/Object"; // #4 
  37     Utf8 "<init>"; // #5 
  38     Utf8 "()V"; // #6 
  39     Utf8 "Code"; // #7 
  40     Method #3 #9; // #8 
  41     NameAndType #5 #6; // #9 
  42     Utf8 "main"; // #10 
  43     Utf8 "([Ljava/lang/String;)V"; // #11 
  44     Utf8 "UnknownAttr.Added"; // #12 
  45   } // Constant Pool 
  46 
  47   0x0021; // access 
  48   #1;// this_cpx 
  49   #3;// super_cpx 
  50 
  51   [] { // Interfaces 
  52   } // Interfaces 
  53 
  54   [] { // fields 
  55   } // fields 
  56 
  57   [] { // methods 
  58     { // Member 
  59       0x0001; // access 
  60       #5; // name_cpx 
  61       #6; // sig_cpx 
  62       [] { // Attributes 
  63         Attr(#7) { // Code 
  64           1; // max_stack 
  65           1; // max_locals 
  66           Bytes[]{ 
  67             0x2AB70008B1; 
  68           } 
  69           [] { // Traps 
  70           } // end Traps 
  71           [] { // Attributes 
  72           } // Attributes 
  73         } // end Code 
  74       } // Attributes 
  75     } // Member 
  76     ; 
  77     { // Member 
  78       0x0009; // access 
  79       #10; // name_cpx 
  80       #11; // sig_cpx 
  81       [] { // Attributes 
  82         Attr(#7) { // Code 
  83           0; // max_stack 
  84           1; // max_locals 
  85           Bytes[]{ 
  86             0xB1; 
  87           } 
  88           [] { // Traps 
  89           } // end Traps 
  90           [] { // Attributes 
  91           } // Attributes 
  92         } // end Code 
  93       } // Attributes 
  94     } // Member 
  95   } // methods 
  96 
  97   [] { // Attributes 
  98     Attr(#12) { // UnknownAttr.Added 
  99       0x00; 
 100     } // end UnknownAttr.Added 
 101   } // Attributes 
 102 } // end class UnknownAttr