Class MethodUtils.MethodDescriptor

  • Enclosing class:
    MethodUtils

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

      Fields 
      Modifier and Type Field Description
      private java.lang.Class<?> cls  
      private boolean exact  
      private int hashCode  
      private java.lang.String methodName  
      private java.lang.Class<?>[] paramTypes  
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodDescriptor​(java.lang.Class<?> cls, java.lang.String methodName, java.lang.Class<?>[] paramTypes, boolean exact)
      The sole constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Checks for equality.
      int hashCode()
      Returns the string length of method name.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cls

        private final java.lang.Class<?> cls
      • methodName

        private final java.lang.String methodName
      • paramTypes

        private final java.lang.Class<?>[] paramTypes
      • exact

        private final boolean exact
      • hashCode

        private final int hashCode
    • Constructor Detail

      • MethodDescriptor

        public MethodDescriptor​(java.lang.Class<?> cls,
                                java.lang.String methodName,
                                java.lang.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 Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Checks for equality.
        Overrides:
        equals in class java.lang.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 java.lang.Object
        Returns:
        the string length of method name.