Package org.springframework.core
Class MethodClassKey
- java.lang.Object
- org.springframework.core.MethodClassKey
- All Implemented Interfaces:
Comparable<MethodClassKey>
public final class MethodClassKey extends Object implements Comparable<MethodClassKey>
A common key class for a method against a specific target class, includingtoString()
representation andComparable
support (as suggested for customHashMap
keys as of Java 8).- Since:
- 4.3
- Author:
- Juergen Hoeller
Constructor Summary
Constructors Constructor Description MethodClassKey(Method method, Class<?> targetClass)
Create a key object for the given method and target class.
Constructor Detail
MethodClassKey
public MethodClassKey(Method method, @Nullable Class<?> targetClass)
Create a key object for the given method and target class.- Parameters:
method
- the method to wrap (must not benull
)targetClass
- the target class that the method will be invoked on (may benull
if identical to the declaring class)
Method Detail
compareTo
public int compareTo(MethodClassKey other)
- Specified by:
compareTo
in interfaceComparable<MethodClassKey>