66use PHPJava \Exceptions \ReadOnlyException ;
77use PHPJava \Exceptions \RuntimeException ;
88use PHPJava \Kernel \Maps \ConstantPoolTag ;
9- use PHPJava \Kernel \Structures \_Class ;
10- use PHPJava \Kernel \Structures \_Double ;
11- use PHPJava \Kernel \Structures \_Fieldref ;
12- use PHPJava \Kernel \Structures \_Float ;
13- use PHPJava \Kernel \Structures \_Integer ;
14- use PHPJava \Kernel \Structures \_InterfaceMethodref ;
15- use PHPJava \Kernel \Structures \_InvokeDynamic ;
16- use PHPJava \Kernel \Structures \_Long ;
17- use PHPJava \Kernel \Structures \_MethodHandle ;
18- use PHPJava \Kernel \Structures \_Methodref ;
19- use PHPJava \Kernel \Structures \_MethodType ;
20- use PHPJava \Kernel \Structures \_NameAndType ;
21- use PHPJava \Kernel \Structures \_String ;
22- use PHPJava \Kernel \Structures \_Utf8 ;
9+ use PHPJava \Kernel \Structures \ClassInfo ;
10+ use PHPJava \Kernel \Structures \DoubleInfo ;
11+ use PHPJava \Kernel \Structures \FieldrefInfo ;
12+ use PHPJava \Kernel \Structures \FloatInfo ;
2313use PHPJava \Kernel \Structures \FreezableInterface ;
14+ use PHPJava \Kernel \Structures \IntegerInfo ;
15+ use PHPJava \Kernel \Structures \InterfaceMethodrefInfo ;
16+ use PHPJava \Kernel \Structures \InvokeDynamicInfo ;
17+ use PHPJava \Kernel \Structures \LongInfo ;
18+ use PHPJava \Kernel \Structures \MethodHandleInfo ;
19+ use PHPJava \Kernel \Structures \MethodrefInfo ;
20+ use PHPJava \Kernel \Structures \MethodTypeInfo ;
21+ use PHPJava \Kernel \Structures \NameAndTypeInfo ;
22+ use PHPJava \Kernel \Structures \StringInfo ;
2423use PHPJava \Kernel \Structures \StructureInterface ;
24+ use PHPJava \Kernel \Structures \Utf8Info ;
2525
2626class ConstantPool implements \ArrayAccess, \Countable, \IteratorAggregate
2727{
@@ -51,8 +51,8 @@ public function __construct(ReaderInterface $reader, int $entries)
5151 $ this ->entries [$ i ]->execute ();
5252
5353 // Java's Long and Double problem.
54- if ($ this ->entries [$ i ] instanceof _Long ||
55- $ this ->entries [$ i ] instanceof _Double ) {
54+ if ($ this ->entries [$ i ] instanceof LongInfo ||
55+ $ this ->entries [$ i ] instanceof DoubleInfo ) {
5656 $ i ++;
5757 }
5858 }
@@ -73,33 +73,33 @@ private function read(int $entryTag): ?StructureInterface
7373 {
7474 switch ($ entryTag ) {
7575 case ConstantPoolTag::CONSTANT_Class:
76- return new _Class ($ this ->reader );
76+ return new ClassInfo ($ this ->reader );
7777 case ConstantPoolTag::CONSTANT_Fieldref:
78- return new _Fieldref ($ this ->reader );
78+ return new FieldrefInfo ($ this ->reader );
7979 case ConstantPoolTag::CONSTANT_Methodref:
80- return new _Methodref ($ this ->reader );
80+ return new MethodrefInfo ($ this ->reader );
8181 case ConstantPoolTag::CONSTANT_String:
82- return new _String ($ this ->reader );
82+ return new StringInfo ($ this ->reader );
8383 case ConstantPoolTag::CONSTANT_Integer:
84- return new _Integer ($ this ->reader );
84+ return new IntegerInfo ($ this ->reader );
8585 case ConstantPoolTag::CONSTANT_Float:
86- return new _Float ($ this ->reader );
86+ return new FloatInfo ($ this ->reader );
8787 case ConstantPoolTag::CONSTANT_Long:
88- return new _Long ($ this ->reader );
88+ return new LongInfo ($ this ->reader );
8989 case ConstantPoolTag::CONSTANT_Double:
90- return new _Double ($ this ->reader );
90+ return new DoubleInfo ($ this ->reader );
9191 case ConstantPoolTag::CONSTANT_NameAndType:
92- return new _NameAndType ($ this ->reader );
92+ return new NameAndTypeInfo ($ this ->reader );
9393 case ConstantPoolTag::CONSTANT_Utf8:
94- return new _Utf8 ($ this ->reader );
94+ return new Utf8Info ($ this ->reader );
9595 case ConstantPoolTag::CONSTANT_InterfaceMethodref:
96- return new _InterfaceMethodref ($ this ->reader );
96+ return new InterfaceMethodrefInfo ($ this ->reader );
9797 case ConstantPoolTag::CONSTANT_InvokeDynamic:
98- return new _InvokeDynamic ($ this ->reader );
98+ return new InvokeDynamicInfo ($ this ->reader );
9999 case ConstantPoolTag::CONSTANT_MethodHandle:
100- return new _MethodHandle ($ this ->reader );
100+ return new MethodHandleInfo ($ this ->reader );
101101 case ConstantPoolTag::CONSTANT_MethodType:
102- return new _MethodType ($ this ->reader );
102+ return new MethodTypeInfo ($ this ->reader );
103103 case ConstantPoolTag::CONSTANT_Module:
104104 case ConstantPoolTag::CONSTANT_Package:
105105 throw new ReadEntryException ('Entry tag ' . sprintf ('0x%04X ' , $ entryTag ) . ' is not implemented. ' );
0 commit comments