Class MethodWrapper


  • public class MethodWrapper
    extends java.lang.Object
    Helper struct that saves a method and a method name. The method name can be different from the original name.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.reflect.Method method
      The method.
      protected java.lang.String name
      The method name.
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodWrapper​(java.lang.reflect.Method method)
      Create a new method wrapper.
      MethodWrapper​(java.lang.String name, java.lang.reflect.Method method)
      Create a new method wrapper.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Equal when name and parameters are equal.
      java.lang.reflect.Method getMethod()
      Get the method.
      java.lang.String getName()
      Get the name.
      int hashCode()
      Get the hash code.
      void setMethod​(java.lang.reflect.Method method)
      Set the method.
      void setName​(java.lang.String name)
      Set the name.
      • Methods inherited from class java.lang.Object

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

      • name

        protected java.lang.String name
        The method name.
      • method

        protected java.lang.reflect.Method method
        The method.
    • Constructor Detail

      • MethodWrapper

        public MethodWrapper​(java.lang.reflect.Method method)
        Create a new method wrapper.
      • MethodWrapper

        public MethodWrapper​(java.lang.String name,
                             java.lang.reflect.Method method)
        Create a new method wrapper.
    • Method Detail

      • getMethod

        public java.lang.reflect.Method getMethod()
        Get the method.
        Returns:
        the method.
      • setMethod

        public void setMethod​(java.lang.reflect.Method method)
        Set the method.
        Parameters:
        method - The method to set.
      • getName

        public java.lang.String getName()
        Get the name.
        Returns:
        the name.
      • setName

        public void setName​(java.lang.String name)
        Set the name.
        Parameters:
        name - The name to set.
      • hashCode

        public int hashCode()
        Get the hash code.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Equal when name and parameters are equal.
        Overrides:
        equals in class java.lang.Object