-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathBootstrapMethod.php
More file actions
43 lines (35 loc) · 1009 Bytes
/
BootstrapMethod.php
File metadata and controls
43 lines (35 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
declare(strict_types=1);
namespace PHPJava\Kernel\Structures;
class BootstrapMethod implements StructureInterface
{
use \PHPJava\Kernel\Core\BinaryReader;
use \PHPJava\Kernel\Core\ConstantPool;
use \PHPJava\Kernel\Core\DebugTool;
/**
* @var int
*/
private $bootstrapMethodRef;
/**
* @var int
*/
private $numBootstrapArguments = 0;
private $bootstrapArguments = [];
public function execute(): void
{
$this->bootstrapMethodRef = $this->readUnsignedShort();
$this->numBootstrapArguments = $this->readUnsignedShort();
$cp = $this->getConstantPool();
for ($i = 0; $i < $this->numBootstrapArguments; $i++) {
$this->bootstrapArguments[] = $cp[$this->readUnsignedShort()];
}
}
public function getBootstrapMethodRef(): int
{
return $this->bootstrapMethodRef;
}
public function getBootstrapArguments(): array
{
return $this->bootstrapArguments;
}
}