private static StringBuilder join(final Object... vals) { return join(", ", Arrays.asList(vals)); }
private static StringBuilder join(final Object... vals) { return join(", ", Arrays.asList(vals)); }
public static void checkForThrows(TypeElement type, ExecutableElement method) { // warn if the method raises any exceptions (except for RaiseException) List<String> exNames = new ArrayList<>(); for (TypeMirror ex : method.getThrownTypes()) { final String name = ex.toString(); if (!name.equals("org.jruby.exceptions.RaiseException")) { exNames.add(name); } } if (exNames.size() > 0) { warn("method " + type + "." + method + " should not throw exceptions: " + join(", ", exNames)); } }
public static void checkForThrows(TypeElement type, ExecutableElement method) { // warn if the method raises any exceptions (except for RaiseException) List<String> exNames = new ArrayList<>(); for (TypeMirror ex : method.getThrownTypes()) { final String name = ex.toString(); if (!name.equals("org.jruby.exceptions.RaiseException")) { exNames.add(name); } } if (exNames.size() > 0) { warn("method " + type + "." + method + " should not throw exceptions: " + join(", ", exNames)); } }
args.addAll(getSimpleMethodMappings(cd, simpleNames)); out.println(" runtime.addBoundMethods(" + join(args.stream().map((str) -> quote(str)).toArray()) + ");");
args.addAll(getSimpleMethodMappings(cd, simpleNames)); out.println(" runtime.addBoundMethods(" + join(args.stream().map((str) -> quote(str)).toArray()) + ");");
out.println(" javaMethod = new " + annotatedBindingName + "(" + implClass + ", Visibility." + anno.visibility() + ", \"" + baseName + "\");"); out.println(" populateMethod(javaMethod, " + join(AnnotationHelper.getArityValue(anno, actualRequired), quote(method.getSimpleName()), isStatic,
out.println(" javaMethod = new " + annotatedBindingName + "(" + implClass + ", Visibility." + anno.visibility() + ", \"" + baseName + "\");"); out.println(" populateMethod(javaMethod, " + join(-1, quote(method.getSimpleName()), isStatic,
out.println(" javaMethod = new " + annotatedBindingName + "(" + implClass + ", Visibility." + anno.visibility() + ", \"" + baseName + "\");"); out.println(" populateMethod(javaMethod, " + join(-1, quote(method.getSimpleName()), isStatic,
out.println(" javaMethod = new " + annotatedBindingName + "(" + implClass + ", Visibility." + anno.visibility() + ", \"" + baseName + "\");"); out.println(" populateMethod(javaMethod, " + join(AnnotationHelper.getArityValue(anno, actualRequired), quote(method.getSimpleName()), isStatic,