Package juzu.impl.common

Examples of juzu.impl.common.FileKey


                return owner.resolveTagHandler(name);
              }

              @Override
              public void createResource(Path.Absolute path, CharSequence content) throws IOException {
                FileKey key = FileKey.newName(path);
                FileObject scriptFile = owner.application.getProcessingContext().createResource(StandardLocation.CLASS_OUTPUT, key, elements);
                Writer writer = null;
                try {
                  writer = scriptFile.openWriter();
                  writer.append(content);
View Full Code Here


      if (file == null) {
        throw new IllegalArgumentException("Could not find compilation unit: " + compilationUnit);
      }
      names.remove(names.size() - 1);
      String pkg = Tools.join('.', names);
      FileKey key = FileKey.newJavaName(pkg, name);
      javaFiles.add(manager.getReadable(key));
    }
    return javaFiles;
  }
View Full Code Here

        }
      }

      public void file(P file, String name) throws IOException {
        if (name.endsWith(".java")) {
          FileKey key = FileKey.newJavaName(buffer.substring(0, buffer.length() - 1), name);
          JavaFileObject fileObject = fileManager.getReadable(key);
          javaFiles.add(fileObject);
        }
      }
View Full Code Here

          list(packageName.isEmpty() ? name : packageName + "." + name, child, kinds, true, to);
        }
      }
      else {
        String name = fs.getName(child);
        FileKey key = FileKey.newName(packageName, name);
        if (kinds.contains(key.getKind())) {
          to.add(getReadable(key));
        }
      }
    }
  }
View Full Code Here

    }
  }

  @Override
  public FileObject getFileForInput(Location location, String packageName, String relativeName) throws IOException {
    FileKey key = FileKey.newResourceName(packageName, relativeName);
    FileManager files = getFiles(location);
    if (files != null) {
      return files.getReadable(key);
    }
    else {
View Full Code Here

    }
  }

  @Override
  public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling) throws IOException {
    FileKey key = FileKey.newResourceName(packageName, relativeName);

    // Address a bug
    if (location == StandardLocation.SOURCE_PATH) {
      FileObject file = sourcePath.getReadable(key);
      if (file == null) {
        throw new FileNotFoundException("Not found:" + key.toString());
      }
      return file;
    }
    else {
      FileManager files = getFiles(location);
View Full Code Here

    }
  }

  @Override
  public boolean isSameFile(FileObject a, FileObject b) {
    FileKey ka = ((JavaFileObjectImpl)a).getKey();
    FileKey kb = ((JavaFileObjectImpl)b).getKey();
    return ka.equals(kb);
  }
View Full Code Here

  @Override
  public JavaFileObject getJavaFileForOutput(Location location, String className, JavaFileObject.Kind kind, FileObject sibling) throws IOException {
    FileManager files = getFiles(location);
    if (files != null) {
      FileKey key = FileKey.newJavaName(className, kind);
      return files.getWritable(key);
    }
    else {
      throw new UnsupportedOperationException("Location " + location + " not supported");
    }
View Full Code Here

TOP

Related Classes of juzu.impl.common.FileKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.