Class ReflectiveFunctionBase

    • Field Detail

      • method

        public final java.lang.reflect.Method method
        Method that implements the function.
      • parameters

        public final java.util.List<FunctionParameter> parameters
        Types of parameter for the function call.
    • Constructor Detail

      • ReflectiveFunctionBase

        public ReflectiveFunctionBase​(java.lang.reflect.Method method)
        ReflectiveFunctionBase constructor
        Parameters:
        method - method that is used to get type information from
    • Method Detail

      • getParameters

        public java.util.List<FunctionParameter> getParameters()
        Returns the parameters of this function.
        Specified by:
        getParameters in interface Function
        Returns:
        Parameters; never null
      • classHasPublicZeroArgsConstructor

        static boolean classHasPublicZeroArgsConstructor​(java.lang.Class<?> clazz)
        Verifies if given class has public constructor with zero arguments.
        Parameters:
        clazz - class to verify
        Returns:
        true if given class has public constructor with zero arguments
      • findMethod

        static java.lang.reflect.Method findMethod​(java.lang.Class<?> clazz,
                                                   java.lang.String name)
        Finds a method in a given class by name.
        Parameters:
        clazz - class to search method in
        name - name of the method to find
        Returns:
        the first method with matching name or null when no method found