Re: [Sablevm-developer] Re: Reflection and interfaces
                
                Brought to you by:
                
                    egagnon
                    
                
            
            
        
        
        
    | 
     
      
      
      From: David  <db...@cs...> - 2004-05-21 16:25:28
      
     
   | 
On Fri, May 21, 2004 at 12:21:25PM +0200, Laurent Martelli wrote:
> >>>>> "Grzegorz" =3D=3D Grzegorz B Prokopski <ga...@de...> writes:
>=20
>   Grzegorz> On (19/05/04 14:19), Laurent Martelli wrote:
>   >> Hello,
>   >>=20
>   >> java.lang.Class.getMethods() returns an empty for interfaces with
>   >> sablevm 1.1.4. Is it a known bug/limitation ?
>=20
>   Grzegorz> I have looked at the code of Classpath and functions
>   Grzegorz> called into the VM and it seems that this should be
>   Grzegorz> handled.  I presume it's a bug then.
>=20
>   Grzegorz> Could somebody more insightful take a look at that?
>=20
> I think java.lang.Class.getDeclaredMethods() should rather look like th=
is:
>=20
>   Method[] getDeclaredMethods (boolean publicOnly)
>   {
> -    if (isPrimitive() || isArray() || isInterface())
> +    if (isPrimitive() || isArray())
>     {
>       return new Method[] { };
>     }
>     else
>     {
>       return VMClass.getDeclaredMethods(this, publicOnly);
>     }
>   }
Hi Laurent,
This is the correct fix and will make it in SableVM/staging version.
Thanks,
David
---
David B=E9langer
Graduate Student
School of Computer Science
McGill University
Office: MC226
Web page:   http://www.cs.mcgill.ca/~dbelan2/
Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt
 |