File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ namespace PHPJava \Kernel \Attributes ;
3+
4+ use PHPJava \Exceptions \NotImplementedException ;
5+ use PHPJava \Kernel \Structures \_LocalVariableTable ;
6+ use PHPJava \Utilities \BinaryTool ;
7+
8+ final class MethodParametersAttribute implements AttributeInterface
9+ {
10+ use \PHPJava \Kernel \Core \BinaryReader;
11+ use \PHPJava \Kernel \Core \ConstantPool;
12+ use \PHPJava \Kernel \Core \AttributeReference;
13+ use \PHPJava \Kernel \Core \DebugTool;
14+
15+ private $ parameters = [];
16+
17+ public function execute (): void
18+ {
19+ $ parametersCount = $ this ->readUnsignedByte ();
20+ for ($ i = 0 ; $ i < $ parametersCount ; $ i ++) {
21+ $ this ->parameters [] = [
22+ 'name_index ' => $ this ->readUnsignedShort (),
23+ 'access_flags ' => $ this ->readUnsignedShort (),
24+ ];
25+ }
26+ }
27+
28+ public function getParameters (): array
29+ {
30+ return $ this ->parameters ;
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments