Class NestedMethodSelector

    • Constructor Summary

      Constructors 
      Constructor Description
      NestedMethodSelector​(java.util.List<java.lang.Class<?>> enclosingClasses, java.lang.Class<?> nestedClass, java.lang.reflect.Method method)  
      NestedMethodSelector​(java.util.List<java.lang.Class<?>> enclosingClasses, java.lang.Class<?> nestedClass, java.lang.String methodName)  
      NestedMethodSelector​(java.util.List<java.lang.Class<?>> enclosingClasses, java.lang.Class<?> nestedClass, java.lang.String methodName, java.lang.String methodParameterTypes)  
      NestedMethodSelector​(java.util.List<java.lang.String> enclosingClassNames, java.lang.String nestedClassName, java.lang.String methodName)  
      NestedMethodSelector​(java.util.List<java.lang.String> enclosingClassNames, java.lang.String nestedClassName, java.lang.String methodName, java.lang.String methodParameterTypes)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.util.List<java.lang.Class<?>> getEnclosingClasses()
      Get the list of Class enclosing the nested Class containing the selected Method.
      java.util.List<java.lang.String> getEnclosingClassNames()
      Get the names of the classes enclosing the nested class containing the selected method.
      java.lang.reflect.Method getMethod()
      Get the selected Method.
      java.lang.String getMethodName()
      Get the name of the selected method.
      java.lang.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.
      java.lang.Class<?> getNestedClass()
      Get the nested Class containing the selected Method.
      java.lang.String getNestedClassName()
      Get the name of the nested class containing the selected method.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NestedMethodSelector

        NestedMethodSelector​(java.util.List<java.lang.String> enclosingClassNames,
                             java.lang.String nestedClassName,
                             java.lang.String methodName)
      • NestedMethodSelector

        NestedMethodSelector​(java.util.List<java.lang.String> enclosingClassNames,
                             java.lang.String nestedClassName,
                             java.lang.String methodName,
                             java.lang.String methodParameterTypes)
      • NestedMethodSelector

        NestedMethodSelector​(java.util.List<java.lang.Class<?>> enclosingClasses,
                             java.lang.Class<?> nestedClass,
                             java.lang.String methodName)
      • NestedMethodSelector

        NestedMethodSelector​(java.util.List<java.lang.Class<?>> enclosingClasses,
                             java.lang.Class<?> nestedClass,
                             java.lang.String methodName,
                             java.lang.String methodParameterTypes)
      • NestedMethodSelector

        NestedMethodSelector​(java.util.List<java.lang.Class<?>> enclosingClasses,
                             java.lang.Class<?> nestedClass,
                             java.lang.reflect.Method method)
    • Method Detail

      • getEnclosingClassNames

        public java.util.List<java.lang.String> getEnclosingClassNames()
        Get the names of the classes enclosing the nested class containing the selected method.
      • getEnclosingClasses

        public java.util.List<java.lang.Class<?>> getEnclosingClasses()
        Get the list of Class enclosing the nested Class containing the selected Method.

        If the Class were not provided, but only the name of the nested class and its enclosing classes, this method attempts to lazily load the list of enclosing Class and throws a PreconditionViolationException if the classes cannot be loaded.

      • getNestedClassName

        public java.lang.String getNestedClassName()
        Get the name of the nested class containing the selected method.
      • getNestedClass

        public java.lang.Class<?> getNestedClass()
        Get the nested Class containing the selected Method.

        If the Class were not provided, but only the name of the nested class and its enclosing classes, this method attempts to lazily load the nested Class and throws a PreconditionViolationException if the class cannot be loaded.

      • getMethodName

        public java.lang.String getMethodName()
        Get the name of the selected method.
      • getMethod

        public java.lang.reflect.Method getMethod()
        Get the selected Method.

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

      • getMethodParameterTypes

        public java.lang.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 NestedMethodSelector via a constructor or deduced from a Method supplied via a constructor; never null
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object