-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathInnerClassesAttribute.php
More file actions
43 lines (37 loc) · 1.02 KB
/
InnerClassesAttribute.php
File metadata and controls
43 lines (37 loc) · 1.02 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
42
43
<?php
declare(strict_types=1);
namespace PHPJava\Kernel\Attributes;
use PHPJava\Kernel\Structures\InnerClasses;
final class InnerClassesAttribute 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 $numberOfClasses = 0;
/**
* @var InnerClasses[]
*/
private $classes = [];
public function execute(): void
{
$this->numberOfClasses = $this->readUnsignedShort();
for ($i = 0; $i < $this->numberOfClasses; $i++) {
$class = new InnerClasses($this->reader);
$class->setConstantPool($this->getConstantPool())
->setDebugTool($this->getDebugTool());
$class->execute();
$this->classes[] = $class;
}
}
/**
* @return InnerClasses[]
*/
public function getClasses(): array
{
return $this->classes;
}
}