private static class MethodTraceAspect.MethodIdentifier
extends java.lang.Object
java.lang.reflect.Method
is not used directly, because its hashCode()
implementation operates on string data, making it slow as a hash map key.Modifier and Type | Field and Description |
---|---|
private int |
hash
Cached hash code
|
private int |
id
Identifier assigned by AspectJ, unique within the method's class
|
private java.lang.reflect.Method |
method
The wrapped method
|
(package private) static MethodTraceAspect.MethodIdentifier |
UNTRACED
Singleton instance meant to represent an untraced method
|
Modifier | Constructor and Description |
---|---|
private |
MethodIdentifier()
Private default constructor intended only to create UNKNOWN singleton.
|
(package private) |
MethodIdentifier(java.lang.reflect.Method method,
int id)
Constructor which computes and caches hash code.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Implementation which is consistent with overridden
hashCode() method. |
int |
hashCode()
Fast implementation which returns the cached hash code.
|
java.lang.String |
toString()
Compose a string representation of this object, primarily for debugging.
|
static final MethodTraceAspect.MethodIdentifier UNTRACED
private final java.lang.reflect.Method method
private final int id
private final int hash
MethodIdentifier(java.lang.reflect.Method method, int id)
method
- The wrapped method.id
- Identifier assigned by AspectJ, unique within the method's class.private MethodIdentifier()
public final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object o)
hashCode()
method.equals
in class java.lang.Object
o
- Object with which to compare this instance.true
if the given instance is equivalent to this instance.public java.lang.String toString()
toString
in class java.lang.Object