Class MethodSelector

    • Method Detail

      • getClassName

        public String getClassName()
        Get the selected class name.
      • getMethodName

        public String getMethodName()
        Get the selected method name.
      • getMethodParameterTypes

        public String getMethodParameterTypes()
        Get the parameter types for the selected method as a String, typically a comma-separated list of primitive types, fully qualified class names, or array types.

        Note: the parameter types are provided as a single string instead of a collection in order to allow this selector to be used in a generic fashion by various test engines. It is therefore the responsibility of the caller of this method to determine how to parse the returned string.

        Returns:
        the parameter types supplied to this MethodSelector via a constructor or deduced from a Method supplied via a constructor; never null
      • getJavaClass

        public Class<?> getJavaClass()
        Get the Class in which the selected method is declared, or a subclass thereof.

        If the Class was not provided, but only the name, this method attempts to lazily load the Class based on its name and throws a PreconditionViolationException if the class cannot be loaded.

        See Also:
        getJavaMethod()