/** * Returns a wrapper for a single-parameter method of the </var>declaringClass</var>, based on * <var>methodName</var> and <var>parameterType</var>. If that method does not exist, a wrapper is returned that * will throw an {@link UnsupportedOperationException} when invoked. * * @param <DC> The class that declares the wrapped method * @param <R> The return type of the wrapped method * @param <P> The type of the single parameter of the wrapped method */ public static <DC, R, P> MethodWrapper1<DC, R, P, RuntimeException> get1(final Class<DC> declaringClass, final String methodName, Class<P> parameterType) { return OptionalMethods.get1(declaringClass, methodName, parameterType, RuntimeException.class); }
/** * Returns a wrapper for a single-parameter method of the </var>declaringClass</var>, based on * <var>methodName</var> and <var>parameterType</var>. If that method does not exist, a wrapper is returned that * will throw an {@link UnsupportedOperationException} when invoked. * * @param <R> The return type of the wrapped method * @param <P> The type of the single parameter of the wrapped method */ public static <R, P> MethodWrapper1<?, R, P, RuntimeException> get1( @Nullable ClassLoader declaringClassLoader, final String declaringClassName, final String methodName, Class<P> parameterType ) { return OptionalMethods.get1( declaringClassLoader, declaringClassName, methodName, parameterType, RuntimeException.class ); }
return OptionalMethods.get1(declaringClass, methodName, parameterType, checkedException);