[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Method.equals() question
From: |
Archie Cobbs |
Subject: |
Re: Method.equals() question |
Date: |
Fri, 28 Feb 2003 12:58:50 -0800 (PST) |
Tom Tromey wrote:
> Archie> - [ lots of code ]
> Archie> + return this == o;
> Archie> }
>
> I don't think there's a guarantee that every call to Class will return
> an identical Method. You have to look at the fields somehow.
If two different Method objects are equal according to the specification
of Method.equals(), then that implies that a class declares two
distinct methods with identical names, parameter types, and return
types... is that possible?? Wouldn't such a class fail verification?
I'm assuming here that the VM guarantees that only one Method object
will ever be created for each declared method in a class.
Thanks,
-Archie
__________________________________________________________________________
Archie Cobbs * Precision I/O * http://www.precisionio.com
Re: Method.equals() question, Brian Jones, 2003/02/27