com.tc.object.bytecode.rwsync
Class MethodId

java.lang.Object
  extended by com.tc.object.bytecode.rwsync.MethodId

public final class MethodId
extends java.lang.Object

Uniquely identify a method by name and signature. Immutable and honors equality contract; can be used as a key.


Constructor Summary
MethodId(java.lang.String name, java.lang.String desc)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String toString()
          Return a string like "setFoo(Ljava/lang/Object;)V".
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodId

public MethodId(java.lang.String name,
                java.lang.String desc)
Parameters:
name - method name, e.g., "setFoo". Must be non-null.
desc - argument descriptor, e.g., "(Ljava/lang/Object;)V". Must be non-null.
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Return a string like "setFoo(Ljava/lang/Object;)V". Because name cannot contain a '(', and desc always starts with a '(', this string representation is as unique as the MethodId itself is, and can be used as a key in collections that require a String key.

Overrides:
toString in class java.lang.Object


Copyright © 2010 Terracotta, Inc.. All Rights Reserved.