Class AbstractExecutableMethodsDefinition<T>

    • Method Detail

      • getExecutableMethodByIndex

        public <R> ExecutableMethod<T,​R> getExecutableMethodByIndex​(int index)
        Gets ExecutableMethod method by it's index.
        Type Parameters:
        R - The result type
        Parameters:
        index - The method index
        Returns:
        The ExecutableMethod
      • getMethod

        @Nullable
        protected <R> ExecutableMethod<T,​R> getMethod​(java.lang.String name,
                                                            java.lang.Class<?>... argumentTypes)
        Finds executable method or returns a null otherwise.
        Type Parameters:
        R - The return type
        Parameters:
        name - The method name
        argumentTypes - The method arguments
        Returns:
        The ExecutableMethod
      • dispatch

        protected java.lang.Object dispatch​(int index,
                                            T target,
                                            java.lang.Object[] args)
        Triggers the invocation of the method at index. Used by Executable.invoke(Object, Object...).
        Parameters:
        index - The method index
        target - The target
        args - The arguments
        Returns:
        The result
      • getTargetMethodByIndex

        protected abstract java.lang.reflect.Method getTargetMethodByIndex​(int index)
        Find Method representation at the method by index. Used by MethodReference.getTargetMethod().
        Parameters:
        index - The index
        Returns:
        The method
      • getAccessibleTargetMethodByIndex

        protected final java.lang.reflect.Method getAccessibleTargetMethodByIndex​(int index)
        Find Method representation at the method by index. Used by MethodReference.getTargetMethod().
        Parameters:
        index - The index
        Returns:
        The method
        Since:
        3.4.0
      • unknownMethodAtIndexException

        protected final java.lang.Throwable unknownMethodAtIndexException​(int index)
        Creates a new exception when the method at index is not found.
        Parameters:
        index - The method index
        Returns:
        The exception
      • unknownDispatchAtIndexException

        protected final java.lang.RuntimeException unknownDispatchAtIndexException​(int index)
        Creates a new exception when the dispatch at index is not found.
        Parameters:
        index - The method index
        Returns:
        The exception
      • methodAtIndexMatches

        protected final boolean methodAtIndexMatches​(int index,
                                                     java.lang.String name,
                                                     java.lang.Class[] argumentTypes)
        Checks if the method at index matches name and argument types.
        Parameters:
        index - The method index
        name - The method name
        argumentTypes - The method arguments
        Returns:
        true if matches