src/share/classes/javax/annotation/processing/Processor.java

Wed, 27 Apr 2016 01:34:52 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:34:52 +0800
changeset 0
959103a6100f
child 2525
2eb010b6cb22
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/langtools/
changeset: 2573:53ca196be1ae
tag: jdk8u25-b17

aoqi@0 1 /*
aoqi@0 2 * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 *
aoqi@0 5 * This code is free software; you can redistribute it and/or modify it
aoqi@0 6 * under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 * published by the Free Software Foundation. Oracle designates this
aoqi@0 8 * particular file as subject to the "Classpath" exception as provided
aoqi@0 9 * by Oracle in the LICENSE file that accompanied this code.
aoqi@0 10 *
aoqi@0 11 * This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 14 * version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 15 * accompanied this code).
aoqi@0 16 *
aoqi@0 17 * You should have received a copy of the GNU General Public License version
aoqi@0 18 * 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 20 *
aoqi@0 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 22 * or visit www.oracle.com if you need additional information or have any
aoqi@0 23 * questions.
aoqi@0 24 */
aoqi@0 25
aoqi@0 26 package javax.annotation.processing;
aoqi@0 27
aoqi@0 28 import java.util.Set;
aoqi@0 29 import javax.lang.model.util.Elements;
aoqi@0 30 import javax.lang.model.AnnotatedConstruct;
aoqi@0 31 import javax.lang.model.element.*;
aoqi@0 32 import javax.lang.model.SourceVersion;
aoqi@0 33
aoqi@0 34 /**
aoqi@0 35 * The interface for an annotation processor.
aoqi@0 36 *
aoqi@0 37 * <p>Annotation processing happens in a sequence of {@linkplain
aoqi@0 38 * javax.annotation.processing.RoundEnvironment rounds}. On each
aoqi@0 39 * round, a processor may be asked to {@linkplain #process process} a
aoqi@0 40 * subset of the annotations found on the source and class files
aoqi@0 41 * produced by a prior round. The inputs to the first round of
aoqi@0 42 * processing are the initial inputs to a run of the tool; these
aoqi@0 43 * initial inputs can be regarded as the output of a virtual zeroth
aoqi@0 44 * round of processing. If a processor was asked to process on a
aoqi@0 45 * given round, it will be asked to process on subsequent rounds,
aoqi@0 46 * including the last round, even if there are no annotations for it
aoqi@0 47 * to process. The tool infrastructure may also ask a processor to
aoqi@0 48 * process files generated implicitly by the tool's operation.
aoqi@0 49 *
aoqi@0 50 * <p> Each implementation of a {@code Processor} must provide a
aoqi@0 51 * public no-argument constructor to be used by tools to instantiate
aoqi@0 52 * the processor. The tool infrastructure will interact with classes
aoqi@0 53 * implementing this interface as follows:
aoqi@0 54 *
aoqi@0 55 * <ol>
aoqi@0 56 *
aoqi@0 57 * <li>If an existing {@code Processor} object is not being used, to
aoqi@0 58 * create an instance of a processor the tool calls the no-arg
aoqi@0 59 * constructor of the processor class.
aoqi@0 60 *
aoqi@0 61 * <li>Next, the tool calls the {@link #init init} method with
aoqi@0 62 * an appropriate {@code ProcessingEnvironment}.
aoqi@0 63 *
aoqi@0 64 * <li>Afterwards, the tool calls {@link #getSupportedAnnotationTypes
aoqi@0 65 * getSupportedAnnotationTypes}, {@link #getSupportedOptions
aoqi@0 66 * getSupportedOptions}, and {@link #getSupportedSourceVersion
aoqi@0 67 * getSupportedSourceVersion}. These methods are only called once per
aoqi@0 68 * run, not on each round.
aoqi@0 69 *
aoqi@0 70 * <li>As appropriate, the tool calls the {@link #process process}
aoqi@0 71 * method on the {@code Processor} object; a new {@code Processor}
aoqi@0 72 * object is <em>not</em> created for each round.
aoqi@0 73 *
aoqi@0 74 * </ol>
aoqi@0 75 *
aoqi@0 76 * If a processor object is created and used without the above
aoqi@0 77 * protocol being followed, then the processor's behavior is not
aoqi@0 78 * defined by this interface specification.
aoqi@0 79 *
aoqi@0 80 * <p> The tool uses a <i>discovery process</i> to find annotation
aoqi@0 81 * processors and decide whether or not they should be run. By
aoqi@0 82 * configuring the tool, the set of potential processors can be
aoqi@0 83 * controlled. For example, for a {@link javax.tools.JavaCompiler
aoqi@0 84 * JavaCompiler} the list of candidate processors to run can be
aoqi@0 85 * {@linkplain javax.tools.JavaCompiler.CompilationTask#setProcessors
aoqi@0 86 * set directly} or controlled by a {@linkplain
aoqi@0 87 * javax.tools.StandardLocation#ANNOTATION_PROCESSOR_PATH search path}
aoqi@0 88 * used for a {@linkplain java.util.ServiceLoader service-style}
aoqi@0 89 * lookup. Other tool implementations may have different
aoqi@0 90 * configuration mechanisms, such as command line options; for
aoqi@0 91 * details, refer to the particular tool's documentation. Which
aoqi@0 92 * processors the tool asks to {@linkplain #process run} is a function
aoqi@0 93 * of the types of the annotations <em>{@linkplain AnnotatedConstruct present}</em>
aoqi@0 94 * on the {@linkplain
aoqi@0 95 * RoundEnvironment#getRootElements root elements}, what {@linkplain
aoqi@0 96 * #getSupportedAnnotationTypes annotation types a processor
aoqi@0 97 * supports}, and whether or not a processor {@linkplain #process
aoqi@0 98 * claims the annotation types it processes}. A processor will be asked to
aoqi@0 99 * process a subset of the annotation types it supports, possibly an
aoqi@0 100 * empty set.
aoqi@0 101 *
aoqi@0 102 * For a given round, the tool computes the set of annotation types
aoqi@0 103 * that are present on the elements enclosed within the root elements.
aoqi@0 104 * If there is at least one annotation type present, then as
aoqi@0 105 * processors claim annotation types, they are removed from the set of
aoqi@0 106 * unmatched annotation types. When the set is empty or no more
aoqi@0 107 * processors are available, the round has run to completion. If
aoqi@0 108 * there are no annotation types present, annotation processing still
aoqi@0 109 * occurs but only <i>universal processors</i> which support
aoqi@0 110 * processing all annotation types, {@code "*"}, can claim the (empty)
aoqi@0 111 * set of annotation types.
aoqi@0 112 *
aoqi@0 113 * <p>An annotation type is considered present if there is at least
aoqi@0 114 * one annotation of that type present on an element enclosed within
aoqi@0 115 * the root elements of a round. For this purpose, a type parameter is
aoqi@0 116 * considered to be enclosed by its {@linkplain
aoqi@0 117 * TypeParameterElement#getGenericElement generic
aoqi@0 118 * element}. Annotations on {@linkplain
aoqi@0 119 * java.lang.annotation.ElementType#TYPE_USE type uses}, as opposed to
aoqi@0 120 * annotations on elements, are ignored when computing whether or not
aoqi@0 121 * an annotation type is present.
aoqi@0 122 *
aoqi@0 123 * <p>An annotation is present if it meets the definition of being
aoqi@0 124 * present given in {@link AnnotatedConstruct}. In brief, an
aoqi@0 125 * annotation is considered present for the purposes of discovery if
aoqi@0 126 * it is directly present or present via inheritance. An annotation is
aoqi@0 127 * <em>not</em> considered present by virtue of being wrapped by a
aoqi@0 128 * container annotation. Operationally, this is equivalent to an
aoqi@0 129 * annotation being present on an element if and only if it would be
aoqi@0 130 * included in the results of {@link
aoqi@0 131 * Elements#getAllAnnotationMirrors(Element)} called on that element. Since
aoqi@0 132 * annotations inside container annotations are not considered
aoqi@0 133 * present, to properly process {@linkplain
aoqi@0 134 * java.lang.annotation.Repeatable repeatable annotation types},
aoqi@0 135 * processors are advised to include both the repeatable annotation
aoqi@0 136 * type and its containing annotation type in the set of {@linkplain
aoqi@0 137 * #getSupportedAnnotationTypes() supported annotation types} of a
aoqi@0 138 * processor.
aoqi@0 139 *
aoqi@0 140 * <p>Note that if a processor supports {@code "*"} and returns {@code
aoqi@0 141 * true}, all annotations are claimed. Therefore, a universal
aoqi@0 142 * processor being used to, for example, implement additional validity
aoqi@0 143 * checks should return {@code false} so as to not prevent other such
aoqi@0 144 * checkers from being able to run.
aoqi@0 145 *
aoqi@0 146 * <p>If a processor throws an uncaught exception, the tool may cease
aoqi@0 147 * other active annotation processors. If a processor raises an
aoqi@0 148 * error, the current round will run to completion and the subsequent
aoqi@0 149 * round will indicate an {@linkplain RoundEnvironment#errorRaised
aoqi@0 150 * error was raised}. Since annotation processors are run in a
aoqi@0 151 * cooperative environment, a processor should throw an uncaught
aoqi@0 152 * exception only in situations where no error recovery or reporting
aoqi@0 153 * is feasible.
aoqi@0 154 *
aoqi@0 155 * <p>The tool environment is not required to support annotation
aoqi@0 156 * processors that access environmental resources, either {@linkplain
aoqi@0 157 * RoundEnvironment per round} or {@linkplain ProcessingEnvironment
aoqi@0 158 * cross-round}, in a multi-threaded fashion.
aoqi@0 159 *
aoqi@0 160 * <p>If the methods that return configuration information about the
aoqi@0 161 * annotation processor return {@code null}, return other invalid
aoqi@0 162 * input, or throw an exception, the tool infrastructure must treat
aoqi@0 163 * this as an error condition.
aoqi@0 164 *
aoqi@0 165 * <p>To be robust when running in different tool implementations, an
aoqi@0 166 * annotation processor should have the following properties:
aoqi@0 167 *
aoqi@0 168 * <ol>
aoqi@0 169 *
aoqi@0 170 * <li>The result of processing a given input is not a function of the presence or absence
aoqi@0 171 * of other inputs (orthogonality).
aoqi@0 172 *
aoqi@0 173 * <li>Processing the same input produces the same output (consistency).
aoqi@0 174 *
aoqi@0 175 * <li>Processing input <i>A</i> followed by processing input <i>B</i>
aoqi@0 176 * is equivalent to processing <i>B</i> then <i>A</i>
aoqi@0 177 * (commutativity)
aoqi@0 178 *
aoqi@0 179 * <li>Processing an input does not rely on the presence of the output
aoqi@0 180 * of other annotation processors (independence)
aoqi@0 181 *
aoqi@0 182 * </ol>
aoqi@0 183 *
aoqi@0 184 * <p>The {@link Filer} interface discusses restrictions on how
aoqi@0 185 * processors can operate on files.
aoqi@0 186 *
aoqi@0 187 * <p>Note that implementors of this interface may find it convenient
aoqi@0 188 * to extend {@link AbstractProcessor} rather than implementing this
aoqi@0 189 * interface directly.
aoqi@0 190 *
aoqi@0 191 * @author Joseph D. Darcy
aoqi@0 192 * @author Scott Seligman
aoqi@0 193 * @author Peter von der Ah&eacute;
aoqi@0 194 * @since 1.6
aoqi@0 195 */
aoqi@0 196 public interface Processor {
aoqi@0 197 /**
aoqi@0 198 * Returns the options recognized by this processor. An
aoqi@0 199 * implementation of the processing tool must provide a way to
aoqi@0 200 * pass processor-specific options distinctly from options passed
aoqi@0 201 * to the tool itself, see {@link ProcessingEnvironment#getOptions
aoqi@0 202 * getOptions}.
aoqi@0 203 *
aoqi@0 204 * <p>Each string returned in the set must be a period separated
aoqi@0 205 * sequence of {@linkplain
aoqi@0 206 * javax.lang.model.SourceVersion#isIdentifier identifiers}:
aoqi@0 207 *
aoqi@0 208 * <blockquote>
aoqi@0 209 * <dl>
aoqi@0 210 * <dt><i>SupportedOptionString:</i>
aoqi@0 211 * <dd><i>Identifiers</i>
aoqi@0 212 *
aoqi@0 213 * <dt><i>Identifiers:</i>
aoqi@0 214 * <dd> <i>Identifier</i>
aoqi@0 215 * <dd> <i>Identifier</i> {@code .} <i>Identifiers</i>
aoqi@0 216 *
aoqi@0 217 * <dt><i>Identifier:</i>
aoqi@0 218 * <dd>Syntactic identifier, including keywords and literals
aoqi@0 219 * </dl>
aoqi@0 220 * </blockquote>
aoqi@0 221 *
aoqi@0 222 * <p> A tool might use this information to determine if any
aoqi@0 223 * options provided by a user are unrecognized by any processor,
aoqi@0 224 * in which case it may wish to report a warning.
aoqi@0 225 *
aoqi@0 226 * @return the options recognized by this processor or an
aoqi@0 227 * empty collection if none
aoqi@0 228 * @see javax.annotation.processing.SupportedOptions
aoqi@0 229 */
aoqi@0 230 Set<String> getSupportedOptions();
aoqi@0 231
aoqi@0 232 /**
aoqi@0 233 * Returns the names of the annotation types supported by this
aoqi@0 234 * processor. An element of the result may be the canonical
aoqi@0 235 * (fully qualified) name of a supported annotation type.
aoqi@0 236 * Alternately it may be of the form &quot;<tt><i>name</i>.*</tt>&quot;
aoqi@0 237 * representing the set of all annotation types with canonical
aoqi@0 238 * names beginning with &quot;<tt><i>name.</i></tt>&quot;. Finally, {@code
aoqi@0 239 * "*"} by itself represents the set of all annotation types,
aoqi@0 240 * including the empty set. Note that a processor should not
aoqi@0 241 * claim {@code "*"} unless it is actually processing all files;
aoqi@0 242 * claiming unnecessary annotations may cause a performance
aoqi@0 243 * slowdown in some environments.
aoqi@0 244 *
aoqi@0 245 * <p>Each string returned in the set must be accepted by the
aoqi@0 246 * following grammar:
aoqi@0 247 *
aoqi@0 248 * <blockquote>
aoqi@0 249 * <dl>
aoqi@0 250 * <dt><i>SupportedAnnotationTypeString:</i>
aoqi@0 251 * <dd><i>TypeName</i> <i>DotStar</i><sub><i>opt</i></sub>
aoqi@0 252 * <dd><tt>*</tt>
aoqi@0 253 *
aoqi@0 254 * <dt><i>DotStar:</i>
aoqi@0 255 * <dd><tt>.</tt> <tt>*</tt>
aoqi@0 256 * </dl>
aoqi@0 257 * </blockquote>
aoqi@0 258 *
aoqi@0 259 * where <i>TypeName</i> is as defined in
aoqi@0 260 * <cite>The Java&trade; Language Specification</cite>.
aoqi@0 261 *
aoqi@0 262 * @return the names of the annotation types supported by this processor
aoqi@0 263 * @see javax.annotation.processing.SupportedAnnotationTypes
aoqi@0 264 * @jls 3.8 Identifiers
aoqi@0 265 * @jls 6.5.5 Meaning of Type Names
aoqi@0 266 */
aoqi@0 267 Set<String> getSupportedAnnotationTypes();
aoqi@0 268
aoqi@0 269 /**
aoqi@0 270 * Returns the latest source version supported by this annotation
aoqi@0 271 * processor.
aoqi@0 272 *
aoqi@0 273 * @return the latest source version supported by this annotation
aoqi@0 274 * processor.
aoqi@0 275 * @see javax.annotation.processing.SupportedSourceVersion
aoqi@0 276 * @see ProcessingEnvironment#getSourceVersion
aoqi@0 277 */
aoqi@0 278 SourceVersion getSupportedSourceVersion();
aoqi@0 279
aoqi@0 280 /**
aoqi@0 281 * Initializes the processor with the processing environment.
aoqi@0 282 *
aoqi@0 283 * @param processingEnv environment for facilities the tool framework
aoqi@0 284 * provides to the processor
aoqi@0 285 */
aoqi@0 286 void init(ProcessingEnvironment processingEnv);
aoqi@0 287
aoqi@0 288 /**
aoqi@0 289 * Processes a set of annotation types on type elements
aoqi@0 290 * originating from the prior round and returns whether or not
aoqi@0 291 * these annotation types are claimed by this processor. If {@code
aoqi@0 292 * true} is returned, the annotation types are claimed and subsequent
aoqi@0 293 * processors will not be asked to process them; if {@code false}
aoqi@0 294 * is returned, the annotation types are unclaimed and subsequent
aoqi@0 295 * processors may be asked to process them. A processor may
aoqi@0 296 * always return the same boolean value or may vary the result
aoqi@0 297 * based on chosen criteria.
aoqi@0 298 *
aoqi@0 299 * <p>The input set will be empty if the processor supports {@code
aoqi@0 300 * "*"} and the root elements have no annotations. A {@code
aoqi@0 301 * Processor} must gracefully handle an empty set of annotations.
aoqi@0 302 *
aoqi@0 303 * @param annotations the annotation types requested to be processed
aoqi@0 304 * @param roundEnv environment for information about the current and prior round
aoqi@0 305 * @return whether or not the set of annotation types are claimed by this processor
aoqi@0 306 */
aoqi@0 307 boolean process(Set<? extends TypeElement> annotations,
aoqi@0 308 RoundEnvironment roundEnv);
aoqi@0 309
aoqi@0 310 /**
aoqi@0 311 * Returns to the tool infrastructure an iterable of suggested
aoqi@0 312 * completions to an annotation. Since completions are being asked
aoqi@0 313 * for, the information provided about the annotation may be
aoqi@0 314 * incomplete, as if for a source code fragment. A processor may
aoqi@0 315 * return an empty iterable. Annotation processors should focus
aoqi@0 316 * their efforts on providing completions for annotation members
aoqi@0 317 * with additional validity constraints known to the processor, for
aoqi@0 318 * example an {@code int} member whose value should lie between 1
aoqi@0 319 * and 10 or a string member that should be recognized by a known
aoqi@0 320 * grammar, such as a regular expression or a URL.
aoqi@0 321 *
aoqi@0 322 * <p>Since incomplete programs are being modeled, some of the
aoqi@0 323 * parameters may only have partial information or may be {@code
aoqi@0 324 * null}. At least one of {@code element} and {@code userText}
aoqi@0 325 * must be non-{@code null}. If {@code element} is non-{@code
aoqi@0 326 * null}, {@code annotation} and {@code member} may be {@code
aoqi@0 327 * null}. Processors may not throw a {@code NullPointerException}
aoqi@0 328 * if some parameters are {@code null}; if a processor has no
aoqi@0 329 * completions to offer based on the provided information, an
aoqi@0 330 * empty iterable can be returned. The processor may also return
aoqi@0 331 * a single completion with an empty value string and a message
aoqi@0 332 * describing why there are no completions.
aoqi@0 333 *
aoqi@0 334 * <p>Completions are informative and may reflect additional
aoqi@0 335 * validity checks performed by annotation processors. For
aoqi@0 336 * example, consider the simple annotation:
aoqi@0 337 *
aoqi@0 338 * <blockquote>
aoqi@0 339 * <pre>
aoqi@0 340 * &#064;MersennePrime {
aoqi@0 341 * int value();
aoqi@0 342 * }
aoqi@0 343 * </pre>
aoqi@0 344 * </blockquote>
aoqi@0 345 *
aoqi@0 346 * (A Mersenne prime is prime number of the form
aoqi@0 347 * 2<sup><i>n</i></sup> - 1.) Given an {@code AnnotationMirror}
aoqi@0 348 * for this annotation type, a list of all such primes in the
aoqi@0 349 * {@code int} range could be returned without examining any other
aoqi@0 350 * arguments to {@code getCompletions}:
aoqi@0 351 *
aoqi@0 352 * <blockquote>
aoqi@0 353 * <pre>
aoqi@0 354 * import static javax.annotation.processing.Completions.*;
aoqi@0 355 * ...
aoqi@0 356 * return Arrays.asList({@link Completions#of(String) of}(&quot;3&quot;),
aoqi@0 357 * of(&quot;7&quot;),
aoqi@0 358 * of(&quot;31&quot;),
aoqi@0 359 * of(&quot;127&quot;),
aoqi@0 360 * of(&quot;8191&quot;),
aoqi@0 361 * of(&quot;131071&quot;),
aoqi@0 362 * of(&quot;524287&quot;),
aoqi@0 363 * of(&quot;2147483647&quot;));
aoqi@0 364 * </pre>
aoqi@0 365 * </blockquote>
aoqi@0 366 *
aoqi@0 367 * A more informative set of completions would include the number
aoqi@0 368 * of each prime:
aoqi@0 369 *
aoqi@0 370 * <blockquote>
aoqi@0 371 * <pre>
aoqi@0 372 * return Arrays.asList({@link Completions#of(String, String) of}(&quot;3&quot;, &quot;M2&quot;),
aoqi@0 373 * of(&quot;7&quot;, &quot;M3&quot;),
aoqi@0 374 * of(&quot;31&quot;, &quot;M5&quot;),
aoqi@0 375 * of(&quot;127&quot;, &quot;M7&quot;),
aoqi@0 376 * of(&quot;8191&quot;, &quot;M13&quot;),
aoqi@0 377 * of(&quot;131071&quot;, &quot;M17&quot;),
aoqi@0 378 * of(&quot;524287&quot;, &quot;M19&quot;),
aoqi@0 379 * of(&quot;2147483647&quot;, &quot;M31&quot;));
aoqi@0 380 * </pre>
aoqi@0 381 * </blockquote>
aoqi@0 382 *
aoqi@0 383 * However, if the {@code userText} is available, it can be checked
aoqi@0 384 * to see if only a subset of the Mersenne primes are valid. For
aoqi@0 385 * example, if the user has typed
aoqi@0 386 *
aoqi@0 387 * <blockquote>
aoqi@0 388 * <code>
aoqi@0 389 * &#064;MersennePrime(1
aoqi@0 390 * </code>
aoqi@0 391 * </blockquote>
aoqi@0 392 *
aoqi@0 393 * the value of {@code userText} will be {@code "1"}; and only
aoqi@0 394 * two of the primes are possible completions:
aoqi@0 395 *
aoqi@0 396 * <blockquote>
aoqi@0 397 * <pre>
aoqi@0 398 * return Arrays.asList(of(&quot;127&quot;, &quot;M7&quot;),
aoqi@0 399 * of(&quot;131071&quot;, &quot;M17&quot;));
aoqi@0 400 * </pre>
aoqi@0 401 * </blockquote>
aoqi@0 402 *
aoqi@0 403 * Sometimes no valid completion is possible. For example, there
aoqi@0 404 * is no in-range Mersenne prime starting with 9:
aoqi@0 405 *
aoqi@0 406 * <blockquote>
aoqi@0 407 * <code>
aoqi@0 408 * &#064;MersennePrime(9
aoqi@0 409 * </code>
aoqi@0 410 * </blockquote>
aoqi@0 411 *
aoqi@0 412 * An appropriate response in this case is to either return an
aoqi@0 413 * empty list of completions,
aoqi@0 414 *
aoqi@0 415 * <blockquote>
aoqi@0 416 * <pre>
aoqi@0 417 * return Collections.emptyList();
aoqi@0 418 * </pre>
aoqi@0 419 * </blockquote>
aoqi@0 420 *
aoqi@0 421 * or a single empty completion with a helpful message
aoqi@0 422 *
aoqi@0 423 * <blockquote>
aoqi@0 424 * <pre>
aoqi@0 425 * return Arrays.asList(of(&quot;&quot;, &quot;No in-range Mersenne primes start with 9&quot;));
aoqi@0 426 * </pre>
aoqi@0 427 * </blockquote>
aoqi@0 428 *
aoqi@0 429 * @param element the element being annotated
aoqi@0 430 * @param annotation the (perhaps partial) annotation being
aoqi@0 431 * applied to the element
aoqi@0 432 * @param member the annotation member to return possible completions for
aoqi@0 433 * @param userText source code text to be completed
aoqi@0 434 *
aoqi@0 435 * @return suggested completions to the annotation
aoqi@0 436 */
aoqi@0 437 Iterable<? extends Completion> getCompletions(Element element,
aoqi@0 438 AnnotationMirror annotation,
aoqi@0 439 ExecutableElement member,
aoqi@0 440 String userText);
aoqi@0 441 }

mercurial