org.springframework.core

Class MethodClassKey

  • java.lang.Object
    • org.springframework.core.MethodClassKey
  • All Implemented Interfaces:
    java.lang.Comparable<MethodClassKey>


    public final class MethodClassKey
    extends java.lang.Object
    implements java.lang.Comparable<MethodClassKey>
    A common key class for a method against a specific target class, including toString() representation and Comparable support (as suggested for custom HashMap keys as of Java 8).
    Since:
    4.3
    Author:
    Juergen Hoeller
    • Constructor Summary

      Constructors 
      Constructor and Description
      MethodClassKey(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
      Create a key object for the given method and target class.
    • Constructor Detail

      • MethodClassKey

        public MethodClassKey(java.lang.reflect.Method method,
                              @Nullable
                              java.lang.Class<?> targetClass)
        Create a key object for the given method and target class.
        Parameters:
        method - the method to wrap (must not be null)
        targetClass - the target class that the method will be invoked on (may be null if identical to the declaring class)
    • Method Detail

      • equals

        public boolean equals(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object