private static void appendClassTypeSignature(StringBuilder sb, TypeInfo type, Iterable <TypeInfo> typeArguments) { sb.append("L").append(type.FullName); if (typeArguments.any()) { sb.append("<"); foreach (var t in typeArguments) { sb.append(t.Signature); } sb.append(">"); } sb.append(";"); }
private static void appendFormalTypeParametersSignature(StringBuilder sb, Iterable <TypeInfo> typeArguments) { if (typeArguments.any()) { sb.append("<"); foreach (var t in typeArguments) { sb.append(t.FullName); var first = true; if (t.GenericParameterBounds.any()) { foreach (var bound in t.GenericParameterBounds) { sb.append(":"); if (first) { first = false; if (!bound.IsObject) { appendClassTypeSignature(sb, bound, bound.GenericArguments); } else { sb.append("Ljava/lang/Object;"); } } else { appendClassTypeSignature(sb, bound, bound.GenericArguments); } } } else { sb.append(":"); sb.append("Ljava/lang/Object;"); } } sb.append(">"); } }
private static String[] getTypeNames(Iterable<TypeInfo> types) { if (types.any()) { String[] result = new String[types.count()]; int i = 0; foreach (var t in types) { result[i++] = t.FullName; } return result; } else { return null; } }
private static bool containsDeprecated(Iterable<AnnotationValue> annotations) { return annotations.any(p => p.Type.FullName.equals("java/lang/Deprecated")); }