[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Method.equals() question
From: |
Tom Tromey |
Subject: |
Re: Method.equals() question |
Date: |
13 Aug 2003 18:09:42 -0600 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>>>>> "Brian" == Brian Jones <address@hidden> writes:
Brian> These have not been applied yet, we should do so before Friday.
Brian> Does this look okay to everyone?
Yes, except for one little nit:
>> - // Implementation note:
>> - // The following is a correct but possibly slow implementation.
>> - //
>> - // This class has a private field 'slot' that could be used by
>> - // the VM implementation to "link" a particular method to a Class.
>> - // In that case equals could be simply implemented as:
>> - //
>> - // if (o instanceof Method)
>> - // {
>> - // Method m = (Method)o;
>> - // return m.declaringClass == this.declaringClass
>> - // && m.slot == this.slot;
>> - // }
>> - // return false;
This part of the comment is still correct and could be left in place.
(This is actually what libgcj does.)
Whether you want to leave it in place, I don't know. I see it is a
nice, but optional, hint to implementors.
Tom