@@ -384,25 +384,25 @@ public static ClassSelector selectClass(Class<?> clazz) {
384384 /**
385385 * Create a {@code ClassSelector} for the supplied class name.
386386 *
387- * @param className the fully qualified name of the class to select;
388- * never {@code null} or blank
387+ * @param className the fully qualified name of the class to select; never
388+ * {@code null} or blank
389389 * @see ClassSelector
390390 */
391391 public static ClassSelector selectClass (String className ) {
392- Preconditions .notBlank (className , "Class name must not be null or blank" );
393- return new ClassSelector (className );
392+ return selectClass (className , null );
394393 }
395394
396395 /**
397- * Create a {@code ClassSelector} for the supplied class name using the
398- * supplied class loader.
396+ * Create a {@code ClassSelector} for the supplied class name and class loader.
399397 *
400- * @param className the fully qualified name of the class to select;
401- * never {@code null} or blank
402- * @param classLoader the class loader to use to try and load the
403- * supplied class. If {@code null}, the default class loader will be used.
398+ * @param className the fully qualified name of the class to select; never
399+ * {@code null} or blank
400+ * @param classLoader the class loader to use to load the class, or {@code null}
401+ * to signal that the default {@code ClassLoader} should be used
402+ * @since 1.10
404403 * @see ClassSelector
405404 */
405+ @ API (status = EXPERIMENTAL , since = "1.10" )
406406 public static ClassSelector selectClass (String className , ClassLoader classLoader ) {
407407 Preconditions .notBlank (className , "Class name must not be null or blank" );
408408 return new ClassSelector (className , classLoader );
@@ -446,8 +446,8 @@ public static ClassSelector selectClass(String className, ClassLoader classLoade
446446 * <tr><td>{@code example.Service.process(String[][])}</td><td>{@code example.Service#process(java.lang.String[][])}</td></tr>
447447 * </table>
448448 *
449- * @param fullyQualifiedMethodName the fully qualified name of the method to select; never
450- * {@code null} or blank
449+ * @param fullyQualifiedMethodName the fully qualified name of the method to
450+ * select; never {@code null} or blank
451451 * @see MethodSelector
452452 */
453453 public static MethodSelector selectMethod (String fullyQualifiedMethodName ) throws PreconditionViolationException {
@@ -456,14 +456,21 @@ public static MethodSelector selectMethod(String fullyQualifiedMethodName) throw
456456
457457 /**
458458 * Create a {@code MethodSelector} for the supplied <em>fully qualified
459- * method name</em> using the given classloader .
459+ * method name</em> and class loader .
460460 *
461- * @param fullyQualifiedMethodName the fully qualified name of the method to select; never
462- * {@code null} or blank (see {@link #selectMethod(String)} for the format of this string).
463- * @param classLoader the class loader to use to try and load the
464- * supplied class. If {@code null}, the default class loader will be used.
461+ * <p>See {@link #selectMethod(String)} for the supported formats for a
462+ * fully qualified method name.
463+ *
464+ * @param fullyQualifiedMethodName the fully qualified name of the method to
465+ * select; never {@code null} or blank
466+ * @param classLoader the class loader to use to load the method's declaring
467+ * class, or {@code null} to signal that the default {@code ClassLoader}
468+ * should be used
469+ * @since 1.10
465470 * @see #selectMethod(String)
471+ * @see MethodSelector
466472 */
473+ @ API (status = EXPERIMENTAL , since = "1.10" )
467474 public static MethodSelector selectMethod (String fullyQualifiedMethodName , ClassLoader classLoader )
468475 throws PreconditionViolationException {
469476 String [] methodParts = ReflectionUtils .parseFullyQualifiedMethodName (fullyQualifiedMethodName );
@@ -484,16 +491,18 @@ public static MethodSelector selectMethod(String className, String methodName) {
484491 }
485492
486493 /**
487- * Create a {@code MethodSelector} for the supplied class name and method name, using
488- * the given class loader to find the class .
494+ * Create a {@code MethodSelector} for the supplied class name, method name,
495+ * and class loader.
489496 *
490497 * @param className the fully qualified name of the class in which the method
491498 * is declared, or a subclass thereof; never {@code null} or blank
492499 * @param methodName the name of the method to select; never {@code null} or blank
493- * @param classLoader the class loader to use to try and load the
494- * supplied class. If {@code null}, the default class loader will be used.
500+ * @param classLoader the class loader to use to load the class, or {@code null}
501+ * to signal that the default {@code ClassLoader} should be used
502+ * @since 1.10
495503 * @see MethodSelector
496504 */
505+ @ API (status = EXPERIMENTAL , since = "1.10" )
497506 public static MethodSelector selectMethod (String className , String methodName , ClassLoader classLoader ) {
498507 Preconditions .notBlank (className , "Class name must not be null or blank" );
499508 Preconditions .notBlank (methodName , "Method name must not be null or blank" );
@@ -522,7 +531,7 @@ public static MethodSelector selectMethod(String className, String methodName, S
522531
523532 /**
524533 * Create a {@code MethodSelector} for the supplied class name, method name,
525- * and method parameter types, using the specified class loader.
534+ * method parameter types, and class loader.
526535 *
527536 * <p>The parameter types {@code String} is typically a comma-separated list
528537 * of atomic types, fully qualified class names, or array types; however,
@@ -534,8 +543,12 @@ public static MethodSelector selectMethod(String className, String methodName, S
534543 * @param methodParameterTypes the method parameter types as a single string; never
535544 * {@code null} though potentially an empty string if the method does not accept
536545 * arguments
546+ * @param classLoader the class loader to use to load the class, or {@code null}
547+ * to signal that the default {@code ClassLoader} should be used
548+ * @since 1.10
537549 * @see MethodSelector
538550 */
551+ @ API (status = EXPERIMENTAL , since = "1.10" )
539552 public static MethodSelector selectMethod (String className , String methodName , String methodParameterTypes ,
540553 ClassLoader classLoader ) {
541554 Preconditions .notBlank (className , "Class name must not be null or blank" );
0 commit comments