public static OrganizedImports organize(CodeTypeElement topLevelClass) { OrganizedImports organized = new OrganizedImports(topLevelClass); organized.organizeImpl(); return organized; }
@Override public Void visitType(TypeMirror t, Void p) { visitTypeReference(enclosingElement, t); return null; }
@Override public void visitStaticFieldReference(Element enclosedType, TypeMirror type, String elementName) { visitTypeReference(enclosedType, type); }
private void visitAnnotations(Element enclosingElement, List<? extends AnnotationMirror> mirrors) { for (AnnotationMirror mirror : mirrors) { visitAnnotation(enclosingElement, mirror); } }
@Override public Void visitAnnotation(AnnotationMirror a, Void p) { AbstractCodeWriter.this.visitAnnotation(enclosedElement, a); return null; }
private void writeLn() { writeLn(""); }
private String createStaticReference(Element enclosedElement, TypeMirror type, String name) { // ambiguous import return createTypeReference(enclosedElement, type) + "." + name; }
public String createStaticMethodReference(Element enclosedElement, TypeMirror type, String methodName) { return createStaticReference(enclosedElement, type, methodName); }
public static OrganizedImports organize(CodeTypeElement topLevelClass) { OrganizedImports organized = new OrganizedImports(topLevelClass); organized.organizeImpl(); return organized; }
@Override public void visitStaticFieldReference(Element enclosedType, TypeMirror type, String elementName) { visitTypeReference(enclosedType, type); }
@Override public Void visitAnnotation(AnnotationMirror a, Void p) { TypeReferenceVisitor.this.visitAnnotation(enclosingElement, a); return null; }
@Override public Void visitType(TypeMirror t, Void p) { visitTypeReference(enclosingElement, t); return null; }
@Override public Void visitAnnotation(AnnotationMirror a, Void p) { AbstractCodeWriter.this.visitAnnotation(enclosedElement, a); return null; }
private void writeEmptyLn() { writeLn(); }
@Override public void visitStaticMethodReference(Element enclosedType, TypeMirror type, String elementName) { visitTypeReference(enclosedType, type); }
private void visitAnnotations(Element enclosingElement, List<? extends AnnotationMirror> mirrors) { for (AnnotationMirror mirror : mirrors) { visitAnnotation(enclosingElement, mirror); } }
@Override public void visitStaticMethodReference(Element enclosedType, TypeMirror type, String elementName) { visitTypeReference(enclosedType, type); }
@Override public Void visitAnnotation(AnnotationMirror a, Void p) { TypeReferenceVisitor.this.visitAnnotation(enclosingElement, a); return null; }