@Override public String toString(ClassSerializer serializer, boolean typed) { return asType().toString(serializer) + "." + value.toString(); } }
@Override public String toString(ClassSerializer serializer, boolean typed) { if (type == null) { return "null"; } return "new " + type.toString(serializer, typed) + "(" + reference.toString(serializer, typed) + ")"; }
protected void printImport(MutableDeclaredType importType) { println("import " + importType.toString(ClassSerializer.CANONICAL, false) + ";"); } }
public static String toString(Type type, ClassSerializer serializer, boolean typed) { if (type instanceof Class) { return toString((Class<?>)type, serializer); } if (type instanceof MutableDeclaredType) { return ((MutableDeclaredType)type).toString(serializer, typed); } if (type instanceof MutableTypeMirror) { return ((MutableTypeMirror)type).toString(serializer); } throw new IllegalArgumentException("Not supported annotation element " + type.toString()); }
if (processingType != null && processingType.toString(ClassSerializer.CANONICAL, false).equals(Object.class.getCanonicalName())) { processingType = null;
private int processElements(Collection<MutableDeclaredType> elements) { Map<String, Element> els = new HashMap<String, Element>(); for (MutableDeclaredType element: elements) { els.put(element.getCanonicalName(), processingEnv.getElementUtils().getTypeElement(element.toString(ClassSerializer.CANONICAL, false))); } int processedElementCount = 0; for (MutableDeclaredType element: elements) { if (!ListUtils.containsElement(processedElements, element)) { Element el = els.get(element.getCanonicalName()); if (el == null) { processingEnv.getMessager().printMessage(Kind.ERROR, "Element " + element.toString() + " is not available for the processing!"); } else { if (configurer == null || configurer.isSupportedKind(el.getKind())) { if (processedElements.size() == 0 || !getExecutionType().equals(ExecutionType.ONCE)) { processedElements.add(element); init(el, roundEnv); processedElementCount += processElement(element, roundEnv); configurer.flushMessages(processingEnv.getMessager(), el); } } } } } return processedElementCount; }
pw.print(type.getKind().toString() + " " + type.toString(ClassSerializer.SIMPLE, false)); if (superClassType != null && !superClassType.toString(ClassSerializer.CANONICAL).equals(Object.class.getCanonicalName()) && !type.getKind().equals(MutableTypeKind.INTERFACE)) { pw.print(" extends ", superClassType); int i = 0; if (superClassType != null && !superClassType.toString(ClassSerializer.CANONICAL).equals(Object.class.getCanonicalName()) && type.getKind().equals(MutableTypeKind.INTERFACE)) { pw.print(toPrintableType(superClassType)); } else if (superClassType != null && !superClassType.toString(ClassSerializer.CANONICAL).equals(Object.class.getCanonicalName()) && type.getKind().equals(MutableTypeKind.INTERFACE)) { pw.print(" extends ");