@SuppressWarnings("unchecked") private static <T> Class<T> getBound(Type[] bounds) { if (bounds.length == 0) { return (Class<T>) Object.class; } else { return getTypeParamBoundRawType(bounds[0]); } }
@SuppressWarnings("unchecked") private static <T> Class<T> getBound(Type[] bounds) { if (bounds.length == 0) { return (Class<T>) Object.class; } else { return getTypeParamBoundRawType(bounds[0]); } }
@SuppressWarnings("unchecked") private static <T> Class<T> getBound(Type[] bounds) { if (bounds.length == 0) { return (Class<T>) Object.class; } else { return getTypeParamBoundRawType(bounds[0]); } }
@SuppressWarnings("unchecked") private static <T> Class<T> getBound(Type[] bounds) { if (bounds.length == 0) { return (Class<T>) Object.class; } else { return getTypeParamBoundRawType(bounds[0]); } }
@SuppressWarnings("unchecked") private static <T> Class<T> getBound(Type[] bounds) { if (bounds.length == 0) { return (Class<T>) Object.class; } else { return getTypeParamBoundRawType(bounds[0]); } }
/** * TypeParameter * * @param typeVariable * @param builder */ private static void typeParameter(TypeVariable<?> typeVariable, StringBuilder builder) { builder.append(typeVariable.getName()); Type[] bounds = typeVariable.getBounds(); if (bounds.length > 0) { for (int i = 0; i < bounds.length; i++) { // If the first bound is an interface, add additional colon to comply with the spec (ClassBound is not optional) if (i == 0 && getTypeParamBoundRawType(bounds[i]).isInterface()) { builder.append(COLON); } builder.append(COLON); javaType(bounds[i], builder); } } else { // If no upper bound is declared, the upper bound is java.lang.Object builder.append(COLON); javaType(Object.class, builder); } }
/** * TypeParameter * * @param typeVariable * @param builder */ private static void typeParameter(TypeVariable<?> typeVariable, StringBuilder builder) { builder.append(typeVariable.getName()); Type[] bounds = typeVariable.getBounds(); if (bounds.length > 0) { for (int i = 0; i < bounds.length; i++) { // If the first bound is an interface, add additional colon to comply with the spec (ClassBound is not optional) if (i == 0 && getTypeParamBoundRawType(bounds[i]).isInterface()) { builder.append(COLON); } builder.append(COLON); javaType(bounds[i], builder); } } else { // If no upper bound is declared, the upper bound is java.lang.Object builder.append(COLON); javaType(Object.class, builder); } }
/** * TypeParameter * * @param typeVariable * @param builder */ private static void typeParameter(TypeVariable<?> typeVariable, StringBuilder builder) { builder.append(typeVariable.getName()); Type[] bounds = typeVariable.getBounds(); if (bounds.length > 0) { for (int i = 0; i < bounds.length; i++) { // If the first bound is an interface, add additional colon to comply with the spec (ClassBound is not optional) if (i == 0 && getTypeParamBoundRawType(bounds[i]).isInterface()) { builder.append(COLON); } builder.append(COLON); javaType(bounds[i], builder); } } else { // If no upper bound is declared, the upper bound is java.lang.Object builder.append(COLON); javaType(Object.class, builder); } }
/** * TypeParameter * * @param typeVariable * @param builder */ private static void typeParameter(TypeVariable<?> typeVariable, StringBuilder builder) { builder.append(typeVariable.getName()); Type[] bounds = typeVariable.getBounds(); if (bounds.length > 0) { for (int i = 0; i < bounds.length; i++) { // If the first bound is an interface, add additional colon to comply with the spec (ClassBound is not optional) if (i == 0 && getTypeParamBoundRawType(bounds[i]).isInterface()) { builder.append(COLON); } builder.append(COLON); javaType(bounds[i], builder); } } else { // If no upper bound is declared, the upper bound is java.lang.Object builder.append(COLON); javaType(Object.class, builder); } }
/** * TypeParameter * * @param typeVariable * @param builder */ private static void typeParameter(TypeVariable<?> typeVariable, StringBuilder builder) { builder.append(typeVariable.getName()); Type[] bounds = typeVariable.getBounds(); if (bounds.length > 0) { for (int i = 0; i < bounds.length; i++) { // If the first bound is an interface, add additional colon to comply with the spec (ClassBound is not optional) if (i == 0 && getTypeParamBoundRawType(bounds[i]).isInterface()) { builder.append(COLON); } builder.append(COLON); javaType(bounds[i], builder); } } else { // If no upper bound is declared, the upper bound is java.lang.Object builder.append(COLON); javaType(Object.class, builder); } }