@@ -17,34 +17,62 @@ public function execute(): void
1717 {
1818 $ this ->tag = chr ($ this ->readByte ());
1919
20- $ this ->constValueIndex = $ this ->readUnsignedShort ();
21-
22-
23- $ this ->enumConstValue = [
24- 'type_name_index ' => $ this ->readUnsignedShort (),
25- 'const_name_index ' => $ this ->readUnsignedShort (),
26- ];
27-
28- $ this ->classInfoIndex = $ this ->readUnsignedShort ();
29-
30- $ cpInfo = $ this ->getConstantPool ()->getEntries ();
31-
32- if ($ this ->tag === '@ ' ) {
33- $ this ->annotationValue = new AttributeInfo ($ this ->reader );
34- $ this ->annotationValue ->setConstantPool ($ this ->getConstantPool ());
35- $ this ->annotationValue ->execute ();
36- }
37-
38- if ($ this ->tag === '[ ' ) {
39- $ this ->arrayValue = [
40- 'num_values ' => $ this ->readUnsignedShort (),
41-
42- ];
20+ switch ($ this ->tag ) {
21+ case 'B ' : // const_value_index
22+ case 'C ' :
23+ case 'D ' :
24+ case 'F ' :
25+ case 'I ' :
26+ case 'J ' :
27+ case 'S ' :
28+ case 'Z ' :
29+ case 's ' :
30+ break ;
31+ case 'e ' : // enum_const_value
32+ break ;
33+ case 'c ' : // class_info_index
34+ break ;
35+ case '@ ' : // annotation_value
36+ break ;
37+ case '[ ' : // array_value
38+ break ;
4339 }
4440//
45- // for ($i = 0; $i < $this->arrayValue['num_values']; $i++) {
41+ // var_dump($this->tag);
42+ //
43+ // $this->constValueIndex = $this->readUnsignedShort();
44+ //
45+ //
46+ // $this->enumConstValue = [
47+ // 'type_name_index' => $this->readUnsignedShort(),
48+ // 'const_name_index' => $this->readUnsignedShort(),
49+ // ];
50+ //
51+ // $this->classInfoIndex = $this->readUnsignedShort();
52+ //
53+ // $cpInfo = $this->getConstantPool()->getEntries();
54+ //
55+ // if ($this->tag === '@') {
56+ // $this->annotationValue = new AttributeInfo($this->reader);
57+ // $this->annotationValue->setConstantPool($this->getConstantPool());
58+ // $this->annotationValue->execute();
59+ // }
60+ //
61+ // if ($this->tag === '[') {
62+ // $this->arrayValue = [
63+ // 'num_values' => $this->readUnsignedShort(),
64+ //
65+ // ];
66+ // for ($i = 0; ) {
4667//
68+ // }
69+ // var_dump($this->arrayValue);
70+ // exit();
4771// }
72+ ////
73+ //// for ($i = 0; $i < $this->arrayValue['num_values']; $i++) {
74+ ////
75+ //// }
4876
4977 }
5078}
0 commit comments