/** * Create a new SmartHandle that converts arguments from the given return * type and argument types to the current signature's type, using the same * argument names. This conversion is equivalent to MethodHandle#asType. * * @param returnType the return type of the new handle * @param argTypes the argument types of the new handle * @return a new SmartHandle that accepts the given argument types */ public SmartHandle convert(Class<?> returnType, Class<?>... argTypes) { return convert(MethodType.methodType(returnType, argTypes)); }