author | sangheki |
Mon, 27 Nov 2017 13:19:08 -0800 | |
changeset 48132 | 3c0ef95d12e3 |
parent 47216 | 71c04702a3d5 |
child 53201 | 28ec06beb091 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
43567
d0d89c3da7be
8173676: Improvements to javax.annotation.processing and javax.lang.model doc
darcy
parents:
42815
diff
changeset
|
2 |
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. |
10 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
10 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
10 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
10 | 24 |
*/ |
25 |
||
26 |
package javax.annotation.processing; |
|
27 |
||
28 |
import javax.tools.JavaFileManager; |
|
29 |
import javax.tools.*; |
|
30 |
import javax.lang.model.element.Element; |
|
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
31 |
import javax.lang.model.util.Elements; |
10 | 32 |
import java.io.IOException; |
33 |
||
34 |
/** |
|
35 |
* This interface supports the creation of new files by an annotation |
|
36 |
* processor. Files created in this way will be known to the |
|
37 |
* annotation processing tool implementing this interface, better |
|
38 |
* enabling the tool to manage them. Source and class files so |
|
2214
7a15129e2154
6501749: 6501749 Filer should state connection between created files and root elements
darcy
parents:
10
diff
changeset
|
39 |
* created will be {@linkplain RoundEnvironment#getRootElements |
7a15129e2154
6501749: 6501749 Filer should state connection between created files and root elements
darcy
parents:
10
diff
changeset
|
40 |
* considered for processing} by the tool in a subsequent {@linkplain |
7a15129e2154
6501749: 6501749 Filer should state connection between created files and root elements
darcy
parents:
10
diff
changeset
|
41 |
* RoundEnvironment round of processing} after the {@code close} |
7a15129e2154
6501749: 6501749 Filer should state connection between created files and root elements
darcy
parents:
10
diff
changeset
|
42 |
* method has been called on the {@code Writer} or {@code |
7a15129e2154
6501749: 6501749 Filer should state connection between created files and root elements
darcy
parents:
10
diff
changeset
|
43 |
* OutputStream} used to write the contents of the file. |
10 | 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 |
* "path-rootless" 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 |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
70 |
* package-info} files) or modules (representing {@code |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
71 |
* module-info} files) which caused an annotation processor to |
10 | 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 |
* |
|
84 |
* <blockquote><pre> |
|
85 |
* filer.createSourceFile("GeneratedFromUserSource", |
|
86 |
* eltUtils.getTypeElement("UserSource")); |
|
87 |
* </pre></blockquote> |
|
88 |
* |
|
89 |
* If there are no originating elements, none need to be passed. This |
|
90 |
* information may be used in an incremental environment to determine |
|
91 |
* the need to rerun processors or remove generated files. |
|
92 |
* Non-incremental environments may ignore the originating element |
|
93 |
* information. |
|
94 |
* |
|
95 |
* <p> During each run of an annotation processing tool, a file with a |
|
96 |
* given pathname may be created only once. If that file already |
|
97 |
* exists before the first attempt to create it, the old contents will |
|
98 |
* be deleted. Any subsequent attempt to create the same file during |
|
99 |
* a run will throw a {@link FilerException}, as will attempting to |
|
100 |
* create both a class file and source file for the same type name or |
|
101 |
* same package name. The {@linkplain Processor initial inputs} to |
|
102 |
* the tool are considered to be created by the zeroth round; |
|
103 |
* therefore, attempting to create a source or class file |
|
104 |
* corresponding to one of those inputs will result in a {@link |
|
105 |
* FilerException}. |
|
106 |
* |
|
107 |
* <p> In general, processors must not knowingly attempt to overwrite |
|
108 |
* existing files that were not generated by some processor. A {@code |
|
109 |
* Filer} may reject attempts to open a file corresponding to an |
|
110 |
* existing type, like {@code java.lang.Object}. Likewise, the |
|
111 |
* invoker of the annotation processing tool must not knowingly |
|
112 |
* configure the tool such that the discovered processors will attempt |
|
113 |
* to overwrite existing files that were not generated. |
|
114 |
* |
|
115 |
* <p> Processors can indicate a source or class file is generated by |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
116 |
* including a {@code javax.annotation.Generated} annotation if the |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
117 |
* environment is configured so that that type is accessible. |
10 | 118 |
* |
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
119 |
* @apiNote Some of the effect of overwriting a file can be |
10 | 120 |
* achieved by using a <i>decorator</i>-style pattern. Instead of |
121 |
* modifying a class directly, the class is designed so that either |
|
122 |
* its superclass is generated by annotation processing or subclasses |
|
123 |
* of the class are generated by annotation processing. If the |
|
124 |
* subclasses are generated, the parent class may be designed to use |
|
125 |
* factories instead of public constructors so that only subclass |
|
126 |
* instances would be presented to clients of the parent class. |
|
127 |
* |
|
128 |
* @author Joseph D. Darcy |
|
129 |
* @author Scott Seligman |
|
130 |
* @author Peter von der Ahé |
|
131 |
* @since 1.6 |
|
132 |
*/ |
|
133 |
public interface Filer { |
|
134 |
/** |
|
135 |
* Creates a new source file and returns an object to allow |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
136 |
* writing to it. A source file for a type, or a package can |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
137 |
* be created. |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
138 |
* |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
139 |
* The file's name and path (relative to the {@linkplain |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
140 |
* StandardLocation#SOURCE_OUTPUT root output location for source |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
141 |
* files}) are based on the name of the item to be declared in |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
142 |
* that file as well as the specified module for the item (if |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
143 |
* any). |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
144 |
* |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
145 |
* If more than one type is being declared in a single file (that |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
146 |
* is, a single compilation unit), the name of the file should |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
147 |
* correspond to the name of the principal top-level type (the |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
148 |
* public one, for example). |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
149 |
* |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
150 |
* <p>A source file can also be created to hold information about |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
151 |
* a package, including package annotations. To create a source |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
152 |
* file for a named package, have the {@code name} argument be the |
10 | 153 |
* package's name followed by {@code ".package-info"}; to create a |
154 |
* source file for an unnamed package, use {@code "package-info"}. |
|
155 |
* |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
156 |
* <p>The optional module name is prefixed to the type name or |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
157 |
* package name and separated using a "{@code /}" character. For |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
158 |
* example, to create a source file for type {@code a.B} in module |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
159 |
* {@code foo}, use a {@code name} argument of {@code "foo/a.B"}. |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
160 |
* |
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
161 |
* <p>If no explicit module prefix is given and modules are supported |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
162 |
* in the environment, a suitable module is inferred. If a suitable |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
163 |
* module cannot be inferred {@link FilerException} is thrown. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
164 |
* An implementation may use information about the configuration of |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
165 |
* the annotation processing tool as part of the inference. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
166 |
* |
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
167 |
* <p>Creating a source file in or for an unnamed package in a named |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
168 |
* module is <em>not</em> supported. |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
169 |
* |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
170 |
* @apiNote To use a particular {@linkplain |
10 | 171 |
* java.nio.charset.Charset charset} to encode the contents of the |
172 |
* file, an {@code OutputStreamWriter} with the chosen charset can |
|
173 |
* be created from the {@code OutputStream} from the returned |
|
174 |
* object. If the {@code Writer} from the returned object is |
|
175 |
* directly used for writing, its charset is determined by the |
|
176 |
* implementation. An annotation processing tool may have an |
|
177 |
* {@code -encoding} flag or analogous option for specifying this; |
|
178 |
* otherwise, it will typically be the platform's default |
|
179 |
* encoding. |
|
180 |
* |
|
181 |
* <p>To avoid subsequent errors, the contents of the source file |
|
182 |
* should be compatible with the {@linkplain |
|
183 |
* ProcessingEnvironment#getSourceVersion source version} being used |
|
184 |
* for this run. |
|
185 |
* |
|
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
186 |
* @implNote In the reference implementation, if the annotation |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
187 |
* processing tool is processing a single module <i>M</i>, |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
188 |
* then <i>M</i> is used as the module for files created without |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
189 |
* an explicit module prefix. If the tool is processing multiple |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
190 |
* modules, and {@link |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
191 |
* Elements#getPackageElement(java.lang.CharSequence) |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
192 |
* Elements.getPackageElement(package-of(name))} |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
193 |
* returns a package, the module that owns the returned package is used |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
194 |
* as the target module. A separate option may be used to provide the target |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
195 |
* module if it cannot be determined using the above rules. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
196 |
* |
10 | 197 |
* @param name canonical (fully qualified) name of the principal type |
198 |
* being declared in this file or a package name followed by |
|
199 |
* {@code ".package-info"} for a package information file |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
200 |
* @param originatingElements type or package or module elements causally |
10 | 201 |
* associated with the creation of this file, may be elided or |
202 |
* {@code null} |
|
203 |
* @return a {@code JavaFileObject} to write the new source file |
|
204 |
* @throws FilerException if the same pathname has already been |
|
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
205 |
* created, the same type has already been created, the name is |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
206 |
* otherwise not valid for the entity requested to being created, |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
207 |
* if the target module cannot be determined, if the target |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
208 |
* module is not writable, or a module is specified when the environment |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
209 |
* doesn't support modules. |
10 | 210 |
* @throws IOException if the file cannot be created |
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
211 |
* @jls 7.3 Compilation Units |
10 | 212 |
*/ |
213 |
JavaFileObject createSourceFile(CharSequence name, |
|
214 |
Element... originatingElements) throws IOException; |
|
215 |
||
216 |
/** |
|
217 |
* Creates a new class file, and returns an object to allow |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
218 |
* writing to it. A class file for a type, or a package can |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
219 |
* be created. |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
220 |
* |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
221 |
* The file's name and path (relative to the {@linkplain |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
222 |
* StandardLocation#CLASS_OUTPUT root output location for class |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
223 |
* files}) are based on the name of the item to be declared as |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
224 |
* well as the specified module for the item (if any). |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
225 |
* |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
226 |
* <p>A class file can also be created to hold information about a |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
227 |
* package, including package annotations. To create a class file |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
228 |
* for a named package, have the {@code name} argument be the |
10 | 229 |
* package's name followed by {@code ".package-info"}; creating a |
230 |
* class file for an unnamed package is not supported. |
|
231 |
* |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
232 |
* <p>The optional module name is prefixed to the type name or |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
233 |
* package name and separated using a "{@code /}" character. For |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
234 |
* example, to create a class file for type {@code a.B} in module |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
235 |
* {@code foo}, use a {@code name} argument of {@code "foo/a.B"}. |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
236 |
* |
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
237 |
* <p>If no explicit module prefix is given and modules are supported |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
238 |
* in the environment, a suitable module is inferred. If a suitable |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
239 |
* module cannot be inferred {@link FilerException} is thrown. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
240 |
* An implementation may use information about the configuration of |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
241 |
* the annotation processing tool as part of the inference. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
242 |
* |
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
243 |
* <p>Creating a class file in or for an unnamed package in a named |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
244 |
* module is <em>not</em> supported. |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
245 |
* |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
246 |
* @apiNote To avoid subsequent errors, the contents of the class |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
247 |
* file should be compatible with the {@linkplain |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
248 |
* ProcessingEnvironment#getSourceVersion source version} being |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
249 |
* used for this run. |
10 | 250 |
* |
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
251 |
* @implNote In the reference implementation, if the annotation |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
252 |
* processing tool is processing a single module <i>M</i>, |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
253 |
* then <i>M</i> is used as the module for files created without |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
254 |
* an explicit module prefix. If the tool is processing multiple |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
255 |
* modules, and {@link |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
256 |
* Elements#getPackageElement(java.lang.CharSequence) |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
257 |
* Elements.getPackageElement(package-of(name))} |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
258 |
* returns a package, the module that owns the returned package is used |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
259 |
* as the target module. A separate option may be used to provide the target |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
260 |
* module if it cannot be determined using the above rules. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
261 |
* |
10 | 262 |
* @param name binary name of the type being written or a package name followed by |
263 |
* {@code ".package-info"} for a package information file |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
264 |
* @param originatingElements type or package or module elements causally |
10 | 265 |
* associated with the creation of this file, may be elided or |
266 |
* {@code null} |
|
267 |
* @return a {@code JavaFileObject} to write the new class file |
|
268 |
* @throws FilerException if the same pathname has already been |
|
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
269 |
* created, the same type has already been created, the name is |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
270 |
* not valid for a type, if the target module cannot be determined, |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
271 |
* if the target module is not writable, or a module is specified when |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
272 |
* the environment doesn't support modules. |
10 | 273 |
* @throws IOException if the file cannot be created |
274 |
*/ |
|
275 |
JavaFileObject createClassFile(CharSequence name, |
|
276 |
Element... originatingElements) throws IOException; |
|
277 |
||
278 |
/** |
|
279 |
* Creates a new auxiliary resource file for writing and returns a |
|
280 |
* file object for it. The file may be located along with the |
|
281 |
* newly created source files, newly created binary files, or |
|
282 |
* other supported location. The locations {@link |
|
283 |
* StandardLocation#CLASS_OUTPUT CLASS_OUTPUT} and {@link |
|
284 |
* StandardLocation#SOURCE_OUTPUT SOURCE_OUTPUT} must be |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
285 |
* supported. The resource may be named relative to some module |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
286 |
* and/or package (as are source and class files), and from there |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
287 |
* by a relative pathname. In a loose sense, the full pathname of |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
288 |
* the new file will be the concatenation of {@code location}, |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
289 |
* {@code moduleAndPkg}, and {@code relativeName}. |
10 | 290 |
* |
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
291 |
* If {@code moduleAndPkg} contains a "{@code /}" character, the |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
292 |
* prefix before the "{@code /}" character is the module name and |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
293 |
* the suffix after the "{@code /}" character is the package |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
294 |
* name. The package suffix may be empty. If {@code moduleAndPkg} |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
295 |
* does not contain a "{@code /}" character, the entire argument |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
296 |
* is interpreted as a package name. |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
297 |
* |
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
298 |
* <p>If the given location is neither a {@linkplain |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
299 |
* JavaFileManager.Location#isModuleOrientedLocation() |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
300 |
* module oriented location}, nor an {@linkplain |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
301 |
* JavaFileManager.Location#isOutputLocation() |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
302 |
* output location containing multiple modules}, and the explicit |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
303 |
* module prefix is given, {@link FilerException} is thrown. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
304 |
* |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
305 |
* <p>If the given location is either a module oriented location, |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
306 |
* or an output location containing multiple modules, and no explicit |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
307 |
* modules prefix is given, a suitable module is |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
308 |
* inferred. If a suitable module cannot be inferred {@link |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
309 |
* FilerException} is thrown. An implementation may use information |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
310 |
* about the configuration of the annotation processing tool |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
311 |
* as part of the inference. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
312 |
* |
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
313 |
* <p>Files created via this method are <em>not</em> registered for |
10 | 314 |
* annotation processing, even if the full pathname of the file |
315 |
* would correspond to the full pathname of a new source file |
|
316 |
* or new class file. |
|
317 |
* |
|
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
318 |
* @implNote In the reference implementation, if the annotation |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
319 |
* processing tool is processing a single module <i>M</i>, |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
320 |
* then <i>M</i> is used as the module for files created without |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
321 |
* an explicit module prefix. If the tool is processing multiple |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
322 |
* modules, and {@link |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
323 |
* Elements#getPackageElement(java.lang.CharSequence) |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
324 |
* Elements.getPackageElement(package-of(name))} |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
325 |
* returns a package, the module that owns the returned package is used |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
326 |
* as the target module. A separate option may be used to provide the target |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
327 |
* module if it cannot be determined using the above rules. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
328 |
* |
10 | 329 |
* @param location location of the new file |
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
330 |
* @param moduleAndPkg module and/or package relative to which the file |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
331 |
* should be named, or the empty string if none |
10 | 332 |
* @param relativeName final pathname components of the file |
43567
d0d89c3da7be
8173676: Improvements to javax.annotation.processing and javax.lang.model doc
darcy
parents:
42815
diff
changeset
|
333 |
* @param originatingElements type or package or module elements causally |
10 | 334 |
* associated with the creation of this file, may be elided or |
335 |
* {@code null} |
|
336 |
* @return a {@code FileObject} to write the new resource |
|
337 |
* @throws IOException if the file cannot be created |
|
338 |
* @throws FilerException if the same pathname has already been |
|
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
339 |
* created, if the target module cannot be determined, |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
340 |
* or if the target module is not writable, or if an explicit |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
341 |
* target module is specified and the location does not support it. |
10 | 342 |
* @throws IllegalArgumentException for an unsupported location |
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
343 |
* @throws IllegalArgumentException if {@code moduleAndPkg} is ill-formed |
10 | 344 |
* @throws IllegalArgumentException if {@code relativeName} is not relative |
345 |
*/ |
|
346 |
FileObject createResource(JavaFileManager.Location location, |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
347 |
CharSequence moduleAndPkg, |
10 | 348 |
CharSequence relativeName, |
349 |
Element... originatingElements) throws IOException; |
|
350 |
||
351 |
/** |
|
352 |
* Returns an object for reading an existing resource. The |
|
353 |
* locations {@link StandardLocation#CLASS_OUTPUT CLASS_OUTPUT} |
|
354 |
* and {@link StandardLocation#SOURCE_OUTPUT SOURCE_OUTPUT} must |
|
355 |
* be supported. |
|
356 |
* |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
357 |
* <p>If {@code moduleAndPkg} contains a "{@code /}" character, the |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
358 |
* prefix before the "{@code /}" character is the module name and |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
359 |
* the suffix after the "{@code /}" character is the package |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
360 |
* name. The package suffix may be empty; however, if a module |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
361 |
* name is present, it must be nonempty. If {@code moduleAndPkg} |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
362 |
* does not contain a "{@code /}" character, the entire argument |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
363 |
* is interpreted as a package name. |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
364 |
* |
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
365 |
* <p>If the given location is neither a {@linkplain |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
366 |
* JavaFileManager.Location#isModuleOrientedLocation() |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
367 |
* module oriented location}, nor an {@linkplain |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
368 |
* JavaFileManager.Location#isOutputLocation() |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
369 |
* output location containing multiple modules}, and the explicit |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
370 |
* module prefix is given, {@link FilerException} is thrown. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
371 |
* |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
372 |
* <p>If the given location is either a module oriented location, |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
373 |
* or an output location containing multiple modules, and no explicit |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
374 |
* modules prefix is given, a suitable module is |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
375 |
* inferred. If a suitable module cannot be inferred {@link |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
376 |
* FilerException} is thrown. An implementation may use information |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
377 |
* about the configuration of the annotation processing tool |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
378 |
* as part of the inference. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
379 |
* |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
380 |
* @implNote In the reference implementation, if the annotation |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
381 |
* processing tool is processing a single module <i>M</i>, |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
382 |
* then <i>M</i> is used as the module for files read without |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
383 |
* an explicit module prefix. If the tool is processing multiple |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
384 |
* modules, and {@link |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
385 |
* Elements#getPackageElement(java.lang.CharSequence) |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
386 |
* Elements.getPackageElement(package-of(name))} |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
387 |
* returns a package, the module that owns the returned package is used |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
388 |
* as the source module. A separate option may be used to provide the target |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
389 |
* module if it cannot be determined using the above rules. |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
390 |
* |
10 | 391 |
* @param location location of the file |
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
392 |
* @param moduleAndPkg module and/or package relative to which the file |
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
393 |
* should be searched for, or the empty string if none |
10 | 394 |
* @param relativeName final pathname components of the file |
395 |
* @return an object to read the file |
|
396 |
* @throws FilerException if the same pathname has already been |
|
44291
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
397 |
* opened for writing, if the source module cannot be determined, |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
398 |
* or if the target module is not writable, or if an explicit target |
e1b620ac6c98
8175119: Need to specify module of types created by Filer.createSourceFile/Filer.createClassFile?
jlahoda
parents:
43567
diff
changeset
|
399 |
* module is specified and the location does not support it. |
10 | 400 |
* @throws IOException if the file cannot be opened |
401 |
* @throws IllegalArgumentException for an unsupported location |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
402 |
* @throws IllegalArgumentException if {@code moduleAndPkg} is ill-formed |
10 | 403 |
* @throws IllegalArgumentException if {@code relativeName} is not relative |
404 |
*/ |
|
405 |
FileObject getResource(JavaFileManager.Location location, |
|
42815
050370edaade
8072988: Update javax.annotation.processing for modules
jlahoda
parents:
25874
diff
changeset
|
406 |
CharSequence moduleAndPkg, |
10 | 407 |
CharSequence relativeName) throws IOException; |
408 |
} |