line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PJVM::Class::Attribute; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
16
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
118
|
|
4
|
3
|
|
|
3
|
|
23
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
74
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
2000
|
use PJVM::Class::Attribute::Code; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
32
|
|
7
|
3
|
|
|
3
|
|
1849
|
use PJVM::Class::Attribute::ConstantValue; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
27
|
|
8
|
3
|
|
|
3
|
|
1924
|
use PJVM::Class::Attribute::Exceptions; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
29
|
|
9
|
3
|
|
|
3
|
|
1928
|
use PJVM::Class::Attribute::InnerClasses; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
29
|
|
10
|
3
|
|
|
3
|
|
1800
|
use PJVM::Class::Attribute::LineNumberTable; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
28
|
|
11
|
3
|
|
|
3
|
|
2141
|
use PJVM::Class::Attribute::Synthetic; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
266
|
|
12
|
3
|
|
|
3
|
|
2441
|
use PJVM::Class::Attribute::SourceFile; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
32
|
|
13
|
3
|
|
|
3
|
|
2430
|
use PJVM::Class::Attribute::LocalVariableTable; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
29
|
|
14
|
3
|
|
|
3
|
|
1900
|
use PJVM::Class::Attribute::Deprecated; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
666
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
{ |
17
|
|
|
|
|
|
|
my %attribute_class = ( |
18
|
|
|
|
|
|
|
Code => "PJVM::Class::Attribute::Code", |
19
|
|
|
|
|
|
|
ConstantValue => "PJVM::Class::Attribute::ConstantValue", |
20
|
|
|
|
|
|
|
Exceptions => "PJVM::Class::Attribute::Exceptions", |
21
|
|
|
|
|
|
|
InnerClasses => "PJVM::Class::Attribute::InnerClasses", |
22
|
|
|
|
|
|
|
LineNumberTable => "PJVM::Class::Attribute::LineNumberTable", |
23
|
|
|
|
|
|
|
Synthetic => "PJVM::Class::Attribute::Synthetic", |
24
|
|
|
|
|
|
|
SourceFile => "PJVM::Class::Attribute::SourceFile", |
25
|
|
|
|
|
|
|
LocalVariableTable => "PJVM::Class::Attribute::LocalVariableTable", |
26
|
|
|
|
|
|
|
Deprecated => "PJVM::Class::Attribute::Deprecated", |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub new_from_io { |
30
|
21
|
|
|
21
|
0
|
34
|
my ($pkg, $io, $cp) = @_; |
31
|
|
|
|
|
|
|
|
32
|
21
|
|
|
|
|
23
|
my $buff; |
33
|
|
|
|
|
|
|
|
34
|
21
|
|
|
|
|
41
|
read $io, $buff, 2; |
35
|
21
|
|
|
|
|
36
|
my $type_ix = unpack("n", $buff); |
36
|
21
|
|
|
|
|
59
|
my $type = $cp->get($type_ix)->value; |
37
|
|
|
|
|
|
|
|
38
|
21
|
|
|
|
|
111
|
read $io, $buff, 4; |
39
|
21
|
|
|
|
|
39
|
my $length = unpack("N", $buff); |
40
|
|
|
|
|
|
|
|
41
|
21
|
50
|
|
|
|
74
|
if (exists $attribute_class{$type}) { |
42
|
21
|
|
|
|
|
132
|
return $attribute_class{$type}->new_from_io($io, $cp); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
else { |
45
|
0
|
|
|
|
|
|
warn "Couldn't find attribute handler for '${type}'"; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
read $io, $buff, $length; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# Return nothing |
51
|
0
|
|
|
|
|
|
return (); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
__END__ |