< prev index next >

src/java.base/share/classes/java/lang/Class.java

Print this page

        

*** 270,281 **** sb.append(getName()); } TypeVariable<?>[] typeparms = component.getTypeParameters(); if (typeparms.length > 0) { ! sb.append(Stream.of(typeparms).map(Class::typeVarBounds). ! collect(Collectors.joining(",", "<", ">"))); } for (int i = 0; i < arrayDepth; i++) sb.append("[]"); --- 270,282 ---- sb.append(getName()); } TypeVariable<?>[] typeparms = component.getTypeParameters(); if (typeparms.length > 0) { ! sb.append(Arrays.stream(typeparms) ! .map(Class::typeVarBounds) ! .collect(Collectors.joining(",", "<", ">"))); } for (int i = 0; i < arrayDepth; i++) sb.append("[]");
*** 287,298 **** Type[] bounds = typeVar.getBounds(); if (bounds.length == 1 && bounds[0].equals(Object.class)) { return typeVar.getName(); } else { return typeVar.getName() + " extends " + ! Stream.of(bounds).map(Type::getTypeName). ! collect(Collectors.joining(" & ")); } } /** * Returns the {@code Class} object associated with the class or --- 288,300 ---- Type[] bounds = typeVar.getBounds(); if (bounds.length == 1 && bounds[0].equals(Object.class)) { return typeVar.getName(); } else { return typeVar.getName() + " extends " + ! Arrays.stream(bounds) ! .map(Type::getTypeName) ! .collect(Collectors.joining(" & ")); } } /** * Returns the {@code Class} object associated with the class or
*** 3417,3428 **** */ private String methodToString(String name, Class<?>[] argTypes) { StringBuilder sb = new StringBuilder(); sb.append(getName() + "." + name + "("); if (argTypes != null) { ! sb.append(Stream.of(argTypes).map(c -> {return (c == null) ? "null" : c.getName();}). ! collect(Collectors.joining(","))); } sb.append(")"); return sb.toString(); } --- 3419,3431 ---- */ private String methodToString(String name, Class<?>[] argTypes) { StringBuilder sb = new StringBuilder(); sb.append(getName() + "." + name + "("); if (argTypes != null) { ! sb.append(Arrays.stream(argTypes) ! .map(c -> (c == null) ? "null" : c.getName()) ! .collect(Collectors.joining(","))); } sb.append(")"); return sb.toString(); }
< prev index next >