On Fri, Mar 6, 2009 at 10:27 AM, Michael Hunger <[email protected]> wrote:
> Yes I checked it. These are different method instances (unfortunately).
Ok, out the door...
> But as the method count is small we can still loop through the array for
> small numbers instead of using HashMap.
Well, in that case the loop is BAD. At least hashCode would then
exclude a bunch expensive equals() calls. Or are you talking about a
progressive equality calculation within the loop itself?
Method m;
String methodName = m.getName();
for( int i=0; i < known.length; i++ )
{
Method candidate = known[i];
if( methodName.charAt(0) == candidate.charAt(0) )
{
if( methodName.equals( candidate.getName() )
{
if( method.equals( candidate ) )
{
// Found
??
Cheers
Niclas
--
http://www.qi4j.org - New Energy for Java
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev