Package javax.annotation.processing

Examples of javax.annotation.processing.FilerException


    //TODO: do we need to check validity of 'name', or can we trust the filemanager to handle that?
    FileObject fo = _fileManager.getFileForOutput(
        location, pkg.toString(), relativeName.toString(), null);
    URI uri = fo.toUri();
    if (_createdFiles.contains(uri)) {
      throw new FilerException("Resource already created : " + location + '/' + pkg + '/' + relativeName); //$NON-NLS-1$
    }

    _createdFiles.add(uri);
    return fo;
  }
View Full Code Here


    //TODO: do we need to check validity of 'name', or can we trust the filemanager to handle that?
    JavaFileObject jfo = _fileManager.getJavaFileForOutput(
        StandardLocation.SOURCE_OUTPUT, name.toString(), JavaFileObject.Kind.SOURCE, null);
    URI uri = jfo.toUri();
    if (_createdFiles.contains(uri)) {
      throw new FilerException("Source file already created : " + name); //$NON-NLS-1$
    }

    _createdFiles.add(uri);
    // hook the file object's writers to create compilation unit and add to addedUnits()
    return new HookedJavaFileObject(jfo, jfo.getName(), this);
View Full Code Here

    //TODO: do we need to check validity of 'name', or can we trust the filemanager to handle that?
    FileObject fo = _fileManager.getFileForInput(
        location, pkg.toString(), relativeName.toString());
    URI uri = fo.toUri();
    if (_createdFiles.contains(uri)) {
      throw new FilerException("Resource already created : " + location + '/' + pkg + '/' + relativeName); //$NON-NLS-1$
    }

    _createdFiles.add(uri);
    return fo;
  }
View Full Code Here

      Element... originatingElements) throws IOException {
    JavaFileObject jfo = _fileManager.getJavaFileForOutput(
        StandardLocation.CLASS_OUTPUT, name.toString(), JavaFileObject.Kind.CLASS, null);
    URI uri = jfo.toUri();
    if (_createdFiles.contains(uri)) {
      throw new FilerException("Class file already created : " + name); //$NON-NLS-1$
    }

    _createdFiles.add(uri);
    return new HookedJavaFileObject(jfo, jfo.getName(), this);
  }
View Full Code Here

    validateName(relativeName);
    FileObject fo = _fileManager.getFileForOutput(
        location, pkg.toString(), relativeName.toString(), null);
    URI uri = fo.toUri();
    if (_createdFiles.contains(uri)) {
      throw new FilerException("Resource already created : " + location + '/' + pkg + '/' + relativeName); //$NON-NLS-1$
    }

    _createdFiles.add(uri);
    return fo;
  }
View Full Code Here

      Element... originatingElements) throws IOException {
    JavaFileObject jfo = _fileManager.getJavaFileForOutput(
        StandardLocation.SOURCE_OUTPUT, name.toString(), JavaFileObject.Kind.SOURCE, null);
    URI uri = jfo.toUri();
    if (_createdFiles.contains(uri)) {
      throw new FilerException("Source file already created : " + name); //$NON-NLS-1$
    }

    _createdFiles.add(uri);
    // hook the file object's writers to create compilation unit and add to addedUnits()
    return new HookedJavaFileObject(jfo, jfo.getName(), this);
View Full Code Here

    if (fo == null) {
      throw new FileNotFoundException("Resource does not exist : " + location + '/' + pkg + '/' + relativeName); //$NON-NLS-1$
    }
    URI uri = fo.toUri();
    if (_createdFiles.contains(uri)) {
      throw new FilerException("Resource already created : " + location + '/' + pkg + '/' + relativeName); //$NON-NLS-1$
    }

    _createdFiles.add(uri);
    return fo;
  }
View Full Code Here

TOP

Related Classes of javax.annotation.processing.FilerException

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.