-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathStackMapTableAttribute.php
More file actions
41 lines (36 loc) · 1.14 KB
/
StackMapTableAttribute.php
File metadata and controls
41 lines (36 loc) · 1.14 KB
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
<?php
declare(strict_types=1);
namespace PHPJava\Kernel\Attributes;
final class StackMapTableAttribute implements AttributeInterface
{
use \PHPJava\Kernel\Core\BinaryReader;
use \PHPJava\Kernel\Core\ConstantPool;
use \PHPJava\Kernel\Core\AttributeReference;
use \PHPJava\Kernel\Core\DebugTool;
/**
* @var int
*/
private $numberOfEntries;
/**
* @var \PHPJava\Kernel\Structures\StackMapFrameInfo[]
*/
private $stackMapFrames = [];
public function execute(): void
{
$this->numberOfEntries = $this->readUnsignedShort();
for ($i = 0; $i < $this->numberOfEntries; $i++) {
$stackMapFrame = new \PHPJava\Kernel\Structures\StackMapFrameInfo($this->reader);
$stackMapFrame->setConstantPool($this->getConstantPool());
$stackMapFrame->setDebugTool($this->getDebugTool());
$stackMapFrame->execute();
$this->stackMapFrames[] = $stackMapFrame;
}
}
/**
* @return \PHPJava\Kernel\Structures\StackMapFrameInfo[]
*/
public function getStackMapFrames(): array
{
return $this->stackMapFrames;
}
}