org.curjent.impl.agent
Class CallKey

java.lang.Object
  extended by org.curjent.impl.agent.CallKey

final class CallKey
extends Object

Key to map interface methods to call sites. Each interface method is uniquely identified by its name, return type, and parameter types.


Field Summary
private static Class<?>[] empty
          A null list of parameter types is the same as an empty list.
private  int hash
          Cached hash code value of the name, result, and params.
private  String method
          Name of the method.
private  Class<?>[] params
          Method's list of parameter types.
private  Class<?> result
          Method's return type.
 
Constructor Summary
CallKey(Method method)
          Unique key for a given method.
CallKey(String method, Class<?> result, Class<?>[] params)
          Unique key for a method's name, result, and parameters.
 
Method Summary
 boolean equals(Object o)
          true if a CallKey for the same method.
 int hashCode()
          Hash value for the method's name, result type, and parameter types.
 String toString()
          Description of this key's method.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

method

private final String method
Name of the method.


result

private final Class<?> result
Method's return type.


params

private final Class<?>[] params
Method's list of parameter types.


empty

private static final Class<?>[] empty
A null list of parameter types is the same as an empty list.


hash

private final int hash
Cached hash code value of the name, result, and params.

Constructor Detail

CallKey

CallKey(Method method)
Unique key for a given method.


CallKey

CallKey(String method,
        Class<?> result,
        Class<?>[] params)
Unique key for a method's name, result, and parameters.

Method Detail

equals

public boolean equals(Object o)
true if a CallKey for the same method.

Overrides:
equals in class Object

hashCode

public int hashCode()
Hash value for the method's name, result type, and parameter types.

Overrides:
hashCode in class Object

toString

public String toString()
Description of this key's method.

Overrides:
toString in class Object


Copyright 2009-2011 Tom Landon
Apache License 2.0