Class MethodUtils.MethodDescriptor

java.lang.Object
org.apache.commons.beanutils.MethodUtils.MethodDescriptor
Enclosing class:
MethodUtils

private static class MethodUtils.MethodDescriptor extends Object
Represents the key to looking up a Method by reflection.
  • Field Details

    • cls

      private final Class<?> cls
    • methodName

      private final String methodName
    • paramTypes

      private final Class<?>[] paramTypes
    • exact

      private final boolean exact
    • hashCode

      private final int hashCode
  • Constructor Details

    • MethodDescriptor

      public MethodDescriptor(Class<?> cls, String methodName, Class<?>[] paramTypes, boolean exact)
      The sole constructor.
      Parameters:
      cls - the class to reflect, must not be null
      methodName - the method name to obtain
      paramTypes - the array of classes representing the parameter types
      exact - whether the match has to be exact.
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks for equality.
      Overrides:
      equals in class Object
      Parameters:
      obj - object to be tested for equality
      Returns:
      true, if the object describes the same Method.
    • hashCode

      public int hashCode()
      Returns the string length of method name. I.e. if the hashcodes are different, the objects are different. If the hashcodes are the same, need to use the equals method to determine equality.
      Overrides:
      hashCode in class Object
      Returns:
      the string length of method name.