public ArrayList<LazyDocument> documentFor(Filer filer, TypeElement classDeclaration)
      throws SAXParseException {
    String viewName = classDeclaration.getSimpleName() + ".ui.xml";
    Collection<? extends AnnotationMirror> mirrors = classDeclaration.getAnnotationMirrors();
    for (AnnotationMirror mirror : mirrors) {
      if (((TypeElement) mirror.getAnnotationType().asElement()).getQualifiedName().toString()
          .equals("com.guit.client.ViewTemplate")) {
        Map<? extends ExecutableElement, ? extends AnnotationValue> values =
            mirror.getElementValues();
        for (Entry<? extends ExecutableElement, ? extends AnnotationValue> entry : values
            .entrySet()) {
          viewName = (String) entry.getValue().getValue();
          break;
        }
        break;
      }
    }

    String basePackage = classDeclaration.getQualifiedName().toString();
    basePackage = basePackage.substring(0, basePackage.lastIndexOf("."));

    ArrayList<LazyDocument> documents = new ArrayList<LazyDocument>();

    // Try to locate in the same package
    locateFile(filer, basePackage, viewName, documents);

    if (documents.size() == 0) {
      throw new RuntimeException("The view '" + classDeclaration.getQualifiedName()
          + ".ui.xml' was not found");
    }

    return documents;
  }