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 contains a bad element_tag in an element_value structure for a
26// RuntimeVisibleAnnotation at line 91.  The bad element tag should be ignored
27// by the class file parser.
28class badAnnotTag {
29  0xCAFEBABE;
30  0; // minor version
31  52; // version
32  [19] { // Constant Pool
33    ; // first element is empty
34    class #16; // #1     at 0x0A
35    class #17; // #2     at 0x0D
36    class #18; // #3     at 0x10
37    Utf8 "value"; // #4     at 0x13
38    Utf8 "()Ljava/lang/String;"; // #5     at 0x1B
39    Utf8 "SourceFile"; // #6     at 0x32
40    Utf8 "badAnnotTag.java"; // #7     at 0x3F
41    Utf8 "RuntimeVisibleAnnotations"; // #8     at 0x50
42    Utf8 "Ljava/lang/annotation/Target;"; // #9     at 0x6C
43    Utf8 "Ljava/lang/annotation/ElementType;"; // #10     at 0x8C
44    Utf8 "TYPE_USE"; // #11     at 0xB1
45    Utf8 "TYPE_PARAMETER"; // #12     at 0xBC
46    Utf8 "Ljava/lang/annotation/Retention;"; // #13     at 0xCD
47    Utf8 "Ljava/lang/annotation/RetentionPolicy;"; // #14     at 0xF0
48    Utf8 "RUNTIME"; // #15     at 0x0119
49    Utf8 "badAnnotTag"; // #16     at 0x0123
50    Utf8 "java/lang/Object"; // #17     at 0x0127
51    Utf8 "java/lang/annotation/Annotation"; // #18     at 0x013A
52  } // Constant Pool
53
54  0x2600; // access
55  #1;// this_cpx
56  #2;// super_cpx
57
58  [1] { // Interfaces
59    #3;
60  } // Interfaces
61
62  [0] { // fields
63  } // fields
64
65  [1] { // methods
66    { // Member at 0x016A
67      0x0401; // access
68      #4; // name_cpx
69      #5; // sig_cpx
70      [0] { // Attributes
71      } // Attributes
72    } // Member
73  } // methods
74
75  [2] { // Attributes
76    Attr(#6, 2) { // SourceFile at 0x0174
77      #7;
78    } // end SourceFile
79    ;
80    Attr(#8, 32) { // RuntimeVisibleAnnotations at 0x017C
81      [2] { // annotations
82        {  //  annotation
83          #9;
84          [1] { // element_value_pairs
85            {  //  element value pair
86              #4;
87              {  //  element_value
88                '[';
89                [2] { // array_value
90                  {  //  element_value
91                    'd'; // * illegal value *, correct value is 'e'
92                    {  //  enum_const_value
93                      #10;
94                      #11;
95                    }  //  enum_const_value
96                  }  //  element_value
97                  ;
98                  {  //  element_value
99                    'e';
100                    {  //  enum_const_value
101                      #10;
102                      #12;
103                    }  //  enum_const_value
104                  }  //  element_value
105                }  //  array_value
106              }  //  element_value
107            }  //  element value pair
108          }  //  element_value_pairs
109        }  //  annotation
110        ;
111        {  //  annotation
112          #13;
113          [1] { // element_value_pairs
114            {  //  element value pair
115              #4;
116              {  //  element_value
117                'e';
118                {  //  enum_const_value
119                  #14;
120                  #15;
121                }  //  enum_const_value
122              }  //  element_value
123            }  //  element value pair
124          }  //  element_value_pairs
125        }  //  annotation
126      }
127    } // end RuntimeVisibleAnnotations
128  } // Attributes
129} // end class badAnnotTag
130