Just let me know if I can be any help...I am finding this to be an extremely useful 
package.  btw -- I ran into a similar problem with Iterator interfaces.

Sean

-----Original Message-----
From: Patrick LeBoutillier [mailto:[EMAIL PROTECTED]
Sent: Monday, May 31, 2004 10:58 AM
To: Patrick LeBoutillier
Cc: Slotterback, Sean; [EMAIL PROTECTED]
Subject: Re: Inline Java and Inner Classes


Sean,

You have found a nice bug.  Thanks for the easy to reproduce example.

I have tracked down the bug and I think it has really nothing  to do with
inner classes.  The problem is that entrySet()->toArray() returns an array
of Objects, each object of type java.util.HashMap$Entry. But
java.util.HashMap$Entry is NOT a public class. So therefore I can't
manipulate it as easily using reflexion.

What I think I need to do is treat it as a java.util.Map$Entry, which is a
public interface. I'll see how I can acheive this.

Thanks,

Patrick




Patrick LeBoutillier wrote:

> Sean,
>
> That's a great question and to be frank I have never tried to do that. 
> I'll investigate
> and let you know what comes up.
>
> Patrick
>
>
> Slotterback, Sean wrote:
>
>> Sorry if this is a bit of a newbie question, but what is the 
>> procedure for accessing methods of Inner classes in Inline::Java?  I 
>> am fine if I am actually instantiating the Inner class from scratch 
>> as shown on the website, but I can't seem to access ones that have 
>> already been instantiated.  The below example illustrates
>>
>> #! /usr/local/bin/perl
>> use strict;
>> use warnings;
>>
>> use Inline (
>>      Java => 'STUDY',
>>      STUDY => ['java.util.HashMap'],
>>         AUTOSTUDY => 1,
>>   ) ;
>>
>> my $hm = new java::util::HashMap() ;
>> $hm->put("key", "value") ;
>> my $valArr = $hm->entrySet->toArray();
>>
>> for (my $i = 0; $i < $valArr->length(); $i++)
>> {
>>    print $valArr->[$i]->getKey() . "\n";
>> }
>>
>> Any help would be much appreciated.
>>
>> Thanks and Regards,
>> Sean
>>
>>  
>>
>


-- 
=====================
Patrick LeBoutillier
Laval, Quebec, Canada





This e-mail message is intended only for the named recipient(s) above. It may contain 
confidential information. If you are not the intended recipient you are hereby 
notified that any dissemination, distribution or copying of this e-mail and any 
attachment(s) is strictly prohibited. If you have received this e-mail in error, 
please immediately notify the sender by replying to this e-mail and delete the message 
and any attachment(s) from your system. Thank you.

Reply via email to