line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: JavaArray.pm,v 1.1.1.1 2003/11/17 22:08:07 zzo Exp $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package JavaArray; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# Just keep track of java object |
8
|
|
|
|
|
|
|
# A VERY (ridiculously so perhaps!) thin veneer over the stuff in Java.pm... |
9
|
|
|
|
|
|
|
sub TIEARRAY |
10
|
|
|
|
|
|
|
{ |
11
|
0
|
|
|
0
|
|
|
my $class = shift; |
12
|
0
|
|
|
|
|
|
my $java_object = shift; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
return bless { |
15
|
|
|
|
|
|
|
java_object => $java_object, |
16
|
|
|
|
|
|
|
}, $class; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub FETCH |
20
|
|
|
|
|
|
|
{ |
21
|
0
|
|
|
0
|
|
|
my($self,$index) = @_; |
22
|
0
|
|
|
|
|
|
$self->get_object->get_field($index); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub STORE |
26
|
|
|
|
|
|
|
{ |
27
|
0
|
|
|
0
|
|
|
my($self,$index,$value) = @_; |
28
|
0
|
|
|
|
|
|
$self->get_object->set_field($index,$value); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub FETCHSIZE |
32
|
|
|
|
|
|
|
{ |
33
|
0
|
|
|
0
|
|
|
my($self) = @_; |
34
|
0
|
|
|
|
|
|
$self->get_object->get_length; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub STORESIZE |
38
|
|
|
|
|
|
|
{ |
39
|
0
|
|
|
0
|
|
|
my($self) = @_; |
40
|
0
|
|
|
|
|
|
$self->FETCHSIZE+1; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
#sub DESTROY |
44
|
|
|
|
|
|
|
#{ |
45
|
|
|
|
|
|
|
#my($self) = @_; |
46
|
|
|
|
|
|
|
#$self->get_object->DESTROY; |
47
|
|
|
|
|
|
|
#} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub get_object |
50
|
|
|
|
|
|
|
{ |
51
|
0
|
|
|
0
|
0
|
|
my($self) = @_; |
52
|
0
|
|
|
|
|
|
$self->{java_object}; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# Sneaky way to get actual java object outta this thang |
56
|
|
|
|
|
|
|
# for function calls & such w/o having to keep around |
57
|
|
|
|
|
|
|
# the actual object returned by 'tie' |
58
|
|
|
|
|
|
|
sub POP |
59
|
|
|
|
|
|
|
{ |
60
|
0
|
|
|
0
|
|
|
my($self) = @_; |
61
|
0
|
|
|
|
|
|
$self->get_object; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
1; |
64
|
|
|
|
|
|
|
__END__ |