JAVA/LiteralVisitor.pm

filter: Statementstmt 3.5% 8 / 227 Branchbran 0.0% 0 / 84 Conditioncond 0.0% 0 / 21 MC/DCmcdc 0.0% 0 / 14 Subroutinesub 3.7% 2 / 54 Podpod 0.0% 0 / 50 totaltotal 2.2% 10 / 450 CC 61 SCAR 34.6
CC
61
Cov
2%
visitExpression
156.0
_Eval
56.0
visitStringLiteral
56.0
CRAP 31.9
« JAVA/NameVisitor.pm ↑ Summary JAVA/UidVisitor.pm »
1  
2 #
3 # Interface Definition Language (OMG IDL CORBA v3.0)
4 #
5 # IDL to Java Language Mapping Specification, Version 1.2 August 2002
6 #
7  
8 package CORBA::JAVA::LiteralVisitor;
9  
10 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 our $VERSION = '2.62';
14  
15 # needs $node->{java_name} (JavaNameVisitor) for Enum
16 # builds $node->{java_literal}
17  
18 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
19 0 my $proto = shift;
20 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
21 0 my $self = {};
22 0 bless $self, $class;
23 0 my ($parser) = @_;
24 0 $self->{key} = 'java_literal';
25 0 $self->{symbtab} = $parser->YYData->{symbtab};
26 0 return $self;
27 }
28  
29 0 ▶sub _get_defn {
Subroutine _get_defn: not called CC=2 SCAR=17.9
30 0 my $self = shift;
31 0 my ($defn) = @_;
32 0 ▶ if (ref $defn) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $defn) { } 0 0 0
33 0 return $defn;
34 }
35 else {
36 0 return $self->{symbtab}->Lookup($defn);
37 }
38 }
39  
40 0 ▶sub visitType {
Subroutine visitType: not called CC=2 SCAR=17.9
Pod undocumented
41 0 my $self = shift;
42 0 my ($type) = @_;
43  
44 0 ▶ if (ref $type) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $type) { } 0 0 0
45 0 $type->visit($self);
46 }
47 else {
48 0 $self->{symbtab}->Lookup($type)->visit($self);
49 }
50 }
51  
52 #
53 # 3.5 OMG IDL Specification
54 #
55  
56 0 ▶sub visitSpecification {
Subroutine visitSpecification: not called CC=2 SCAR=17.9
Pod undocumented
57 0 my $self = shift;
58 0 my ($node) = @_;
59 0 foreach (@{$node->{list_export}}) {
60 0 $self->{symbtab}->Lookup($_)->visit($self);
61 }
62 }
63  
64 #
65 # 3.7 Module Declaration
66 #
67  
68 0 ▶sub visitModules {
Subroutine visitModules: not called CC=2 SCAR=17.9
Pod undocumented
69 0 my $self = shift;
70 0 my ($node) = @_;
71 0 foreach (@{$node->{list_export}}) {
72 0 $self->{symbtab}->Lookup($_)->visit($self);
73 }
74 }
75  
76 #
77 # 3.8 Interface Declaration
78 #
79  
80 0 ▶sub visitBaseInterface {
Subroutine visitBaseInterface: not called CC=3 SCAR=24.8
Pod undocumented
81 0 my $self = shift;
82 0 my ($node) = @_;
83 0 ▶ return if (exists $node->{$self->{key}});
Branch: 1 branch
BranchTrueFalseTotal
if exists $$node{$self->{"key"}} 0 0 0
84 0 $node->{$self->{key}} = 1;
85 0 foreach (@{$node->{list_export}}) {
86 0 $self->{symbtab}->Lookup($_)->visit($self);
87 }
88 }
89  
90 0 ▶sub visitForwardBaseInterface {
Subroutine visitForwardBaseInterface: not called CC=1 SCAR=0.0
Pod undocumented
91 # empty
92 }
93  
94 #
95 # 3.9 Value Declaration
96 #
97  
98 0 ▶sub visitStateMember {
Subroutine visitStateMember: not called CC=1 SCAR=6.9
Pod undocumented
99 0 shift->visitMember(@_);
100 }
101  
102 0 ▶sub visitInitializer {
Subroutine visitInitializer: not called CC=1 SCAR=6.9
Pod undocumented
103 0 shift->visitOperation(@_);
104 }
105  
106 0 ▶sub visitBoxedValue {
Subroutine visitBoxedValue: not called CC=1 SCAR=6.9
Pod undocumented
107 0 shift->visitTypeDeclarator(@_);
108 }
109  
110 #
111 # 3.10 Constant Declaration
112 #
113  
114 0 ▶sub visitConstant {
Subroutine visitConstant: not called CC=4 SCAR=30.0
Pod undocumented
115 0 my $self = shift;
116 0 my ($node) = @_;
117 0 my $defn;
118 0 my $pkg = $node->{full};
119 0 $pkg =~ s/::[0-9A-Z_a-z]+$//;
120 0 ▶ $defn = $self->{symbtab}->Lookup($pkg) if ($pkg);
Branch: 1 branch
BranchTrueFalseTotal
if $pkg 0 0 0
121 0 ▶ if ( defined $defn and $defn->isa('BaseInterface') ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $defn and $defn->isa('BaseInterface')) { } 0 0 0
Condition0%0/3
defined $defn and $defn->isa("BaseInterface")
!ll&&!rl&&r
000
MC/DC0%0/2
defined $defn and $defn->isa("BaseInterface")
defined $defn $defn->isa("BaseInterface")
Truth table0%0/3
A and B
A= defined $defnB= $defn->isa("BaseInterface")
ABresult
0X0
100
111
122 0 $node->{$self->{key}} = $node->{java_Name};
123 }
124 else {
125 0 $node->{$self->{key}} = $node->{java_Name} . '.value';
126 }
127 0 $node->{value}->visit($self); # expression
128 0 $self->_get_defn($node->{type})->visit($self);
129 }
130  
131 0 ▶sub _Eval {
Subroutine _Eval: not called CC=7 SCAR=40.3
132 0 my $self = shift;
133 0 my ($list_expr, $type) = @_;
134 0 my $elt = pop @{$list_expr};
135 0 ▶ unless (ref $elt) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $elt) 0 0 0
136 0 $elt = $self->{symbtab}->Lookup($elt);
137 }
138 0 ▶ if ( $elt->isa('BinaryOp') ) {
Branch: 5 branches
BranchTrueFalseTotal
if ($elt->isa('BinaryOp')) { } 0 0 0
elsif ($elt->isa('UnaryOp')) { } 0 0 0
elsif ($elt->isa('Constant')) { } 0 0 0
elsif ($elt->isa('Enum')) { } 0 0 0
elsif ($elt->isa('Literal')) { } 0 0 0
139 0 my $right = $self->_Eval($list_expr, $type);
140 0 my $left = $self->_Eval($list_expr, $type);
141 0 return '(' . $left . q{ } . $elt->{op} . q{ } . $right . ')';
142 }
143 elsif ( $elt->isa('UnaryOp') ) {
144 0 my $right = $self->_Eval($list_expr, $type);
145 0 return $elt->{op} . $right;
146 }
147 elsif ( $elt->isa('Constant') ) {
148 0 return $elt->{java_Name};
149 }
150 elsif ( $elt->isa('Enum') ) {
151 0 return $elt->{java_Name};
152 }
153 elsif ( $elt->isa('Literal') ) {
154 0 $elt->visit($self, $type);
155 0 return $elt->{$self->{key}};
156 }
157 else {
158 0 warn __PACKAGE__,"::_Eval: INTERNAL ERROR ",ref $elt,".\n";
159 0 return undef;
160 }
161 }
162  
163 0 ▶sub visitExpression {
Subroutine visitExpression: not called CC=12 SCAR=50.5
Pod undocumented
164 0 my $self = shift;
165 0 my ($node) = @_;
166 0 my @list_expr = @{$node->{list_expr}}; # create a copy
167 0 my $type = $node->{type};
168 0 my $str = $self->_Eval(\@list_expr, $type);
169 0 my $cast = q{};
170 0 ▶ if (ref $type) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $type) 0 0 0
171 0 ▶ while ( $type->isa('TypeDeclarator')
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa("TypeDeclarator") and not exists $type->{"array_size"}) 0 0 0
Condition0%0/3
$type->isa("TypeDeclarator") and not exists $type->{"array_size"}
!ll&&!rl&&r
000
MC/DC0%0/2
$type->isa("TypeDeclarator") and not exists $type->{"array_size"}
$type->isa("TypeDeclarator") not exists $type->{"array_size"}
Truth table0%0/3
A and not(B)
A= $type->isa("TypeDeclarator")B= not exists $type->{"array_size"}
ABresult
0X0
100
111
172 and ! exists $type->{array_size} ) {
173 0 $type = $self->_get_defn($type->{type});
174 }
175 0 ▶ if ($type->isa('EnumType')) {
Branch: 8 branches
BranchTrueFalseTotal
if ($type->isa('EnumType')) { } 0 0 0
elsif ($type->{'value'} eq 'short') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned short') { } 0 0 0
elsif ($type->{'value'} eq 'long') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned long') { } 0 0 0
elsif ($type->{'value'} eq 'long long') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned long long') { } 0 0 0
elsif ($type->{'value'} eq 'octet') { } 0 0 0
176 # empty
177 }
178 elsif ($type->{value} eq 'short') {
179 0 $cast = '(short)';
180 }
181 elsif ($type->{value} eq 'unsigned short') {
182 0 $cast = '(short)';
183 }
184 elsif ($type->{value} eq 'long') {
185 # empty
186 }
187 elsif ($type->{value} eq 'unsigned long') {
188 # empty
189 }
190 elsif ($type->{value} eq 'long long') {
191 0 $cast = '(long)';
192 }
193 elsif ($type->{value} eq 'unsigned long long') {
194 0 $cast = '(long)';
195 }
196 elsif ($type->{value} eq 'octet') {
197 0 $cast = '(byte)';
198 }
199 }
200 0 $node->{$self->{key}} = $cast . $str;
201 }
202  
203 0 ▶sub visitIntegerLiteral {
Subroutine visitIntegerLiteral: not called CC=1 SCAR=6.9
Pod undocumented
204 0 my $self = shift;
205 0 my ($node, $type) = @_;
206 0 my $str = $node->{value};
207 0 $str =~ s/^\+//;
208 0 $node->{$self->{key}} = $str;
209 }
210  
211 0 ▶sub visitStringLiteral {
Subroutine visitStringLiteral: not called CC=7 SCAR=40.3
Pod undocumented
212 0 my $self = shift;
213 0 my ($node) = @_;
214 0 my @list = unpack 'C*', $node->{value};
215 0 my $str = q{"};
216 0 foreach (@list) {
217 0 ▶ if ($_ == 10) {
Branch: 4 branches
BranchTrueFalseTotal
if ($_ == 10) { } 0 0 0
elsif ($_ == 13) { } 0 0 0
elsif ($_ == 34) { } 0 0 0
elsif ($_ < 32 or $_ >= 128) { } 0 0 0
218 0 $str .= "\\n";
219 }
220 elsif ($_ == 13) {
221 0 $str .= "\\r";
222 }
223 elsif ($_ == 34) {
224 0 $str .= "\\\"";
225 }
226 ▶ elsif ($_ < 32 or $_ >= 128) {
Condition0%0/3
$_ < 32 or $_ >= 128
l!l&&r!l&&!r
000
MC/DC0%0/2
$_ < 32 or $_ >= 128
$_ < 32 $_ >= 128
Truth table0%0/3
A or B
A= $_ < 32B= $_ >= 128
ABresult
1X1
011
000
227 0 $str .= sprintf "\\u%04x",$_;
228 }
229 else {
230 0 $str .= chr $_;
231 }
232 }
233 0 $str .= q{"};
234 0 $node->{$self->{key}} = $str;
235 }
236  
237 0 ▶sub visitWideStringLiteral {
Subroutine visitWideStringLiteral: not called CC=1 SCAR=6.9
Pod undocumented
238 0 shift->visitStringLiteral(@_);
239 }
240  
241 0 ▶sub visitCharacterLiteral {
Subroutine visitCharacterLiteral: not called CC=6 SCAR=37.4
Pod undocumented
242 0 my $self = shift;
243 0 my ($node) = @_;
244 0 my @list = unpack 'C', $node->{value};
245 0 my $c = $list[0];
246 0 my $str = q{'};
247 0 ▶ if ($c == 10) {
Branch: 4 branches
BranchTrueFalseTotal
if ($c == 10) { } 0 0 0
elsif ($c == 13) { } 0 0 0
elsif ($c == 39) { } 0 0 0
elsif ($c < 32 or $c >= 128) { } 0 0 0
248 0 $str .= "\\n";
249 }
250 elsif ($c == 13) {
251 0 $str .= "\\r";
252 }
253 elsif ($c == 39) {
254 0 $str .= "\\'";
255 }
256 ▶ elsif ($c < 32 or $c >= 128) {
Condition0%0/3
$c < 32 or $c >= 128
l!l&&r!l&&!r
000
MC/DC0%0/2
$c < 32 or $c >= 128
$c < 32 $c >= 128
Truth table0%0/3
A or B
A= $c < 32B= $c >= 128
ABresult
1X1
011
000
257 0 $str .= sprintf "\\u%04x",$c;
258 }
259 else {
260 0 $str .= chr $c;
261 }
262 0 $str .= q{'};
263 0 $node->{$self->{key}} = $str;
264 }
265  
266 0 ▶sub visitWideCharacterLiteral {
Subroutine visitWideCharacterLiteral: not called CC=1 SCAR=6.9
Pod undocumented
267 0 shift->visitCharacterLiteral(@_);
268 }
269  
270 0 ▶sub visitFixedPtLiteral {
Subroutine visitFixedPtLiteral: not called CC=1 SCAR=6.9
Pod undocumented
271 0 my $self = shift;
272 0 my ($node) = @_;
273 0 my $str = q{"};
274 0 $str .= $node->{value};
275 0 $str .= q{"};
276 0 $node->{$self->{key}} = $str;
277 }
278  
279 0 ▶sub visitFloatingPtLiteral {
Subroutine visitFloatingPtLiteral: not called CC=4 SCAR=30.0
Pod undocumented
280 0 my $self = shift;
281 0 my ($node, $type) = @_;
282 0 my $str = $node->{value};
283 0 ▶ if ( $type->{value} eq 'float' ) {
Branch: 3 branches
BranchTrueFalseTotal
if ($type->{'value'} eq 'float') { } 0 0 0
elsif ($type->{'value'} eq 'double') { } 0 0 0
elsif ($type->{'value'} eq 'long double') { } 0 0 0
284 0 $str .= 'f';
285 }
286 elsif ( $type->{value} eq 'double' ) {
287 0 $str .= 'd';
288 }
289 elsif ( $type->{value} eq 'long double' ) {
290 0 $str .= 'd';
291 }
292 0 $node->{$self->{key}} = $str;
293 }
294  
295 0 ▶sub visitBooleanLiteral {
Subroutine visitBooleanLiteral: not called CC=2 SCAR=17.9
Pod undocumented
296 0 my $self = shift;
297 0 my ($node) = @_;
298 0 ▶ if ($node->{value} eq 'TRUE') {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{'value'} eq 'TRUE') { } 0 0 0
299 0 $node->{$self->{key}} = 'true';
300 }
301 else {
302 0 $node->{$self->{key}} = 'false';
303 }
304 }
305  
306 #
307 # 3.11 Type Declaration
308 #
309  
310 0 ▶sub visitTypeDeclarator {
Subroutine visitTypeDeclarator: not called CC=3 SCAR=24.8
Pod undocumented
311 0 my $self = shift;
312 0 my ($node) = @_;
313 0 $self->visitType($node->{type});
314 0 ▶ if (exists $node->{array_size}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $node->{"array_size"}) 0 0 0
315 0 foreach (@{$node->{array_size}}) {
316 0 my $str = $_->{value};
317 0 $str =~ s/^\+//;
318 0 $_->{$self->{key}} = $str;
319 }
320 }
321 }
322  
323 0 ▶sub visitNativeType {
Subroutine visitNativeType: not called CC=1 SCAR=0.0
Pod undocumented
324 # empty
325 }
326  
327 #
328 # 3.11.1 Basic Types
329 #
330  
331 0 ▶sub visitBasicType {
Subroutine visitBasicType: not called CC=1 SCAR=0.0
Pod undocumented
332 # empty
333 }
334  
335 0 ▶sub visitAnyType {
Subroutine visitAnyType: not called CC=1 SCAR=0.0
Pod undocumented
336 # empty
337 }
338  
339 #
340 # 3.11.2 Constructed Types
341 #
342 # 3.11.2.1 Structures
343 #
344  
345 0 ▶sub visitStructType {
Subroutine visitStructType: not called CC=3 SCAR=24.8
Pod undocumented
346 0 my $self = shift;
347 0 my ($node) = @_;
348 0 ▶ return if (exists $node->{$self->{key}});
Branch: 1 branch
BranchTrueFalseTotal
if exists $$node{$self->{"key"}} 0 0 0
349 0 $node->{$self->{key}} = 1;
350 0 foreach (@{$node->{list_member}}) {
351 0 $self->visitType($_); # member
352 }
353 }
354  
355 0 ▶sub visitMember {
Subroutine visitMember: not called CC=3 SCAR=24.8
Pod undocumented
356 0 my $self = shift;
357 0 my ($node) = @_;
358 0 $self->visitType($node->{type});
359 0 ▶ if (exists $node->{array_size}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $node->{"array_size"}) 0 0 0
360 0 foreach (@{$node->{array_size}}) {
361 0 my $str = $_->{value};
362 0 $str =~ s/^\+//;
363 0 $_->{$self->{key}} = $str;
364 }
365 }
366 }
367  
368 # 3.11.2.2 Discriminated Unions
369 #
370  
371 0 ▶sub visitUnionType {
Subroutine visitUnionType: not called CC=5 SCAR=34.0
Pod undocumented
372 0 my $self = shift;
373 0 my ($node) = @_;
374 0 ▶ return if (exists $node->{$self->{key}});
Branch: 1 branch
BranchTrueFalseTotal
if exists $$node{$self->{"key"}} 0 0 0
375 0 $node->{$self->{key}} = 1;
376 0 my $type = $self->_get_defn($node->{type});
377 0 ▶ while ( $type->isa('TypeDeclarator')
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa("TypeDeclarator") and not exists $type->{"array_size"}) 0 0 0
Condition0%0/3
$type->isa("TypeDeclarator") and not exists $type->{"array_size"}
!ll&&!rl&&r
000
MC/DC0%0/2
$type->isa("TypeDeclarator") and not exists $type->{"array_size"}
$type->isa("TypeDeclarator") not exists $type->{"array_size"}
Truth table0%0/3
A and not(B)
A= $type->isa("TypeDeclarator")B= not exists $type->{"array_size"}
ABresult
0X0
100
111
378 and ! exists $type->{array_size} ) {
379 0 $type = $self->_get_defn($type->{type});
380 }
381 0 $self->visitType($type);
382 0 foreach (@{$node->{list_expr}}) {
383 0 $_->visit($self, $type); # case
384 }
385 }
386  
387 0 ▶sub visitCase {
Subroutine visitCase: not called CC=4 SCAR=30.0
Pod undocumented
388 0 my $self = shift;
389 0 my ($node, $type) = @_;
390 0 foreach (@{$node->{list_label}}) {
391 0 ▶ if ($type->isa('EnumType') and $_->isa('Expression')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa('EnumType') and $_->isa('Expression')) { } 0 0 0
Condition0%0/3
$type->isa("EnumType") and $_->isa("Expression")
!ll&&!rl&&r
000
MC/DC0%0/2
$type->isa("EnumType") and $_->isa("Expression")
$type->isa("EnumType") $_->isa("Expression")
Truth table0%0/3
A and B
A= $type->isa("EnumType")B= $_->isa("Expression")
ABresult
0X0
100
111
392 0 $_->{$self->{key}} = $type->{java_Name} . '._' . $_->{value}->{java_name};
393 }
394 else {
395 0 $_->visit($self); # default or expression
396 }
397 }
398 0 $node->{element}->visit($self); # member
399 }
400  
401 0 ▶sub visitDefault {
Subroutine visitDefault: not called CC=1 SCAR=0.0
Pod undocumented
402 # empty
403 }
404  
405 0 ▶sub visitElement {
Subroutine visitElement: not called CC=1 SCAR=6.9
Pod undocumented
406 0 my $self = shift;
407 0 my ($node) = @_;
408 0 $self->visitType($node->{value}); # member
409 }
410  
411 # 3.11.2.4 Enumerations
412 #
413  
414 0 ▶sub visitEnumType {
Subroutine visitEnumType: not called CC=2 SCAR=17.9
Pod undocumented
415 0 my $self = shift;
416 0 my ($node) = @_;
417 0 foreach (@{$node->{list_expr}}) {
418 0 $_->visit($self); # enum
419 }
420 }
421  
422 0 ▶sub visitEnum {
Subroutine visitEnum: not called CC=1 SCAR=6.9
Pod undocumented
423 0 my $self = shift;
424 0 my ($node) = @_;
425 0 my $type = $self->_get_defn($node->{type});
426 0 $node->{$self->{key}} = $type->{java_Name} . '.' . $node->{java_name};
427 }
428  
429 #
430 # 3.11.3 Template Types
431 #
432  
433 0 ▶sub visitSequenceType {
Subroutine visitSequenceType: not called CC=2 SCAR=17.9
Pod undocumented
434 0 my $self = shift;
435 0 my ($node) = @_;
436 0 $self->visitType($node->{type});
437 0 ▶ $node->{max}->visit($self) if (exists $node->{max});
Branch: 1 branch
BranchTrueFalseTotal
if exists $node->{"max"} 0 0 0
438 }
439  
440 0 ▶sub visitStringType {
Subroutine visitStringType: not called CC=2 SCAR=17.9
Pod undocumented
441 0 my $self = shift;
442 0 my ($node) = @_;
443 0 ▶ $node->{max}->visit($self) if (exists $node->{max});
Branch: 1 branch
BranchTrueFalseTotal
if exists $node->{"max"} 0 0 0
444 }
445  
446 0 ▶sub visitWideStringType {
Subroutine visitWideStringType: not called CC=1 SCAR=6.9
Pod undocumented
447 0 shift->visitStringType(@_);
448 }
449  
450 0 ▶sub visitFixedPtType {
Subroutine visitFixedPtType: not called CC=1 SCAR=6.9
Pod undocumented
451 0 my $self = shift;
452 0 my ($node) = @_;
453 0 $node->{d}->visit($self);
454 0 $node->{s}->visit($self);
455 }
456  
457 0 ▶sub visitFixedPtConstType {
Subroutine visitFixedPtConstType: not called CC=1 SCAR=0.0
Pod undocumented
458 # empty
459 }
460  
461 #
462 # 3.12 Exception Declaration
463 #
464  
465 0 ▶sub visitException {
Subroutine visitException: not called CC=1 SCAR=6.9
Pod undocumented
466 0 shift->visitStructType(@_);
467 }
468  
469 #
470 # 3.13 Operation Declaration
471 #
472  
473 0 ▶sub visitOperation {
Subroutine visitOperation: not called CC=3 SCAR=24.8
Pod undocumented
474 0 my $self = shift;
475 0 my ($node) = @_;
476 $self->visitType($node->{type}) # param_type_spec or void
477 0 ▶ if (exists $node->{type}); # initializer or factory or finder
Branch: 1 branch
BranchTrueFalseTotal
if exists $node->{"type"} 0 0 0
478 0 foreach (@{$node->{list_param}}) {
479 0 $_->visit($self); # parameter
480 }
481 }
482  
483 0 ▶sub visitParameter {
Subroutine visitParameter: not called CC=1 SCAR=6.9
Pod undocumented
484 0 my $self = shift;
485 0 my ($node) = @_;
486 0 $self->visitType($node->{type}); # param_type_spec
487 }
488  
489 0 ▶sub visitVoidType {
Subroutine visitVoidType: not called CC=1 SCAR=0.0
Pod undocumented
490 # empty
491 }
492  
493 #
494 # 3.14 Attribute Declaration
495 #
496  
497 0 ▶sub visitAttribute {
Subroutine visitAttribute: not called CC=1 SCAR=6.9
Pod undocumented
498 0 my $self = shift;
499 0 my ($node) = @_;
500 0 $self->visitType($node->{type}); # param_type_spec
501 }
502  
503 #
504 # 3.15 Repository Identity Related Declarations
505 #
506  
507 0 ▶sub visitTypeId {
Subroutine visitTypeId: not called CC=1 SCAR=0.0
Pod undocumented
508 # empty
509 }
510  
511 0 ▶sub visitTypePrefix {
Subroutine visitTypePrefix: not called CC=1 SCAR=0.0
Pod undocumented
512 # empty
513 }
514  
515 #
516 # 3.16 Event Declaration
517 #
518  
519 #
520 # 3.17 Component Declaration
521 #
522  
523 0 ▶sub visitProvides {
Subroutine visitProvides: not called CC=1 SCAR=0.0
Pod undocumented
524 # empty
525 }
526  
527 0 ▶sub visitUses {
Subroutine visitUses: not called CC=1 SCAR=0.0
Pod undocumented
528 # empty
529 }
530  
531 0 ▶sub visitPublishes {
Subroutine visitPublishes: not called CC=1 SCAR=0.0
Pod undocumented
532 # empty
533 }
534  
535 0 ▶sub visitEmits {
Subroutine visitEmits: not called CC=1 SCAR=0.0
Pod undocumented
536 # empty
537 }
538  
539 0 ▶sub visitConsumes {
Subroutine visitConsumes: not called CC=1 SCAR=0.0
Pod undocumented
540 # empty
541 }
542  
543 #
544 # 3.18 Home Declaration
545 #
546  
547 0 ▶sub visitFactory {
Subroutine visitFactory: not called CC=1 SCAR=6.9
Pod undocumented
548 0 shift->visitOperation(@_);
549 }
550  
551 0 ▶sub visitFinder {
Subroutine visitFinder: not called CC=1 SCAR=6.9
Pod undocumented
552 0 shift->visitOperation(@_);
553 }
554  
555 1 1;
556  
« JAVA/NameVisitor.pm ↑ Summary JAVA/UidVisitor.pm »