< prev index next >

src/java.compiler/share/classes/javax/annotation/processing/Filer.java

Print this page




  43  * OutputStream} used to write the contents of the file.
  44  *
  45  * Three kinds of files are distinguished: source files, class files,
  46  * and auxiliary resource files.
  47  *
  48  * <p> There are two distinguished supported locations (subtrees
  49  * within the logical file system) where newly created files are
  50  * placed: one for {@linkplain
  51  * javax.tools.StandardLocation#SOURCE_OUTPUT new source files}, and
  52  * one for {@linkplain javax.tools.StandardLocation#CLASS_OUTPUT new
  53  * class files}.  (These might be specified on a tool's command line,
  54  * for example, using flags such as {@code -s} and {@code -d}.)  The
  55  * actual locations for new source files and new class files may or
  56  * may not be distinct on a particular run of the tool.  Resource
  57  * files may be created in either location.  The methods for reading
  58  * and writing resources take a relative name argument.  A relative
  59  * name is a non-null, non-empty sequence of path segments separated
  60  * by {@code '/'}; {@code '.'} and {@code '..'} are invalid path
  61  * segments.  A valid relative name must match the
  62  * &quot;path-rootless&quot; rule of <a
  63  * href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>, section
  64  * 3.3.
  65  *
  66  * <p>The file creation methods take a variable number of arguments to
  67  * allow the <em>originating elements</em> to be provided as hints to
  68  * the tool infrastructure to better manage dependencies.  The
  69  * originating elements are the types or packages (representing {@code
  70  * package-info} files) or modules (representing {@code
  71  * module-info} files) which caused an annotation processor to
  72  * attempt to create a new file.  For example, if an annotation
  73  * processor tries to create a source file, {@code
  74  * GeneratedFromUserSource}, in response to processing
  75  *
  76  * <blockquote><pre>
  77  *  @Generate
  78  *  public class UserSource {}
  79  * </pre></blockquote>
  80  *
  81  * the type element for {@code UserSource} should be passed as part of
  82  * the creation method call as in:
  83  *




  43  * OutputStream} used to write the contents of the file.
  44  *
  45  * Three kinds of files are distinguished: source files, class files,
  46  * and auxiliary resource files.
  47  *
  48  * <p> There are two distinguished supported locations (subtrees
  49  * within the logical file system) where newly created files are
  50  * placed: one for {@linkplain
  51  * javax.tools.StandardLocation#SOURCE_OUTPUT new source files}, and
  52  * one for {@linkplain javax.tools.StandardLocation#CLASS_OUTPUT new
  53  * class files}.  (These might be specified on a tool's command line,
  54  * for example, using flags such as {@code -s} and {@code -d}.)  The
  55  * actual locations for new source files and new class files may or
  56  * may not be distinct on a particular run of the tool.  Resource
  57  * files may be created in either location.  The methods for reading
  58  * and writing resources take a relative name argument.  A relative
  59  * name is a non-null, non-empty sequence of path segments separated
  60  * by {@code '/'}; {@code '.'} and {@code '..'} are invalid path
  61  * segments.  A valid relative name must match the
  62  * &quot;path-rootless&quot; rule of <a
  63  * href="http://www.ietf.org/html/rfc3986.txt">RFC 3986</a>, section
  64  * 3.3.
  65  *
  66  * <p>The file creation methods take a variable number of arguments to
  67  * allow the <em>originating elements</em> to be provided as hints to
  68  * the tool infrastructure to better manage dependencies.  The
  69  * originating elements are the types or packages (representing {@code
  70  * package-info} files) or modules (representing {@code
  71  * module-info} files) which caused an annotation processor to
  72  * attempt to create a new file.  For example, if an annotation
  73  * processor tries to create a source file, {@code
  74  * GeneratedFromUserSource}, in response to processing
  75  *
  76  * <blockquote><pre>
  77  *  @Generate
  78  *  public class UserSource {}
  79  * </pre></blockquote>
  80  *
  81  * the type element for {@code UserSource} should be passed as part of
  82  * the creation method call as in:
  83  *


< prev index next >