Skip to content

Commit 39e86df

Browse files
committed
Add attributions
1 parent 82cea88 commit 39e86df

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
}

0 commit comments

Comments
 (0)