langtools/src/java.compiler/share/classes/javax/annotation/processing/Processor.java
changeset 43567 d0d89c3da7be
parent 43133 08a858022ea6
child 43585 19e14d35add0
equal deleted inserted replaced
43566:71aef8336eaa 43567:d0d89c3da7be
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   192  * </ol>
   192  * </ol>
   193  *
   193  *
   194  * <p>The {@link Filer} interface discusses restrictions on how
   194  * <p>The {@link Filer} interface discusses restrictions on how
   195  * processors can operate on files.
   195  * processors can operate on files.
   196  *
   196  *
   197  * <p>Note that implementors of this interface may find it convenient
   197  * @apiNote Implementors of this interface may find it convenient
   198  * to extend {@link AbstractProcessor} rather than implementing this
   198  * to extend {@link AbstractProcessor} rather than implementing this
   199  * interface directly.
   199  * interface directly.
   200  *
   200  *
   201  * @author Joseph D. Darcy
   201  * @author Joseph D. Darcy
   202  * @author Scott Seligman
   202  * @author Scott Seligman
   313      * true} is returned, the annotation types are claimed and subsequent
   313      * true} is returned, the annotation types are claimed and subsequent
   314      * processors will not be asked to process them; if {@code false}
   314      * processors will not be asked to process them; if {@code false}
   315      * is returned, the annotation types are unclaimed and subsequent
   315      * is returned, the annotation types are unclaimed and subsequent
   316      * processors may be asked to process them.  A processor may
   316      * processors may be asked to process them.  A processor may
   317      * always return the same boolean value or may vary the result
   317      * always return the same boolean value or may vary the result
   318      * based on chosen criteria.
   318      * based on its own chosen criteria.
   319      *
   319      *
   320      * <p>The input set will be empty if the processor supports {@code
   320      * <p>The input set will be empty if the processor supports {@code
   321      * "*"} and the root elements have no annotations.  A {@code
   321      * "*"} and the root elements have no annotations.  A {@code
   322      * Processor} must gracefully handle an empty set of annotations.
   322      * Processor} must gracefully handle an empty set of annotations.
   323      *
   323      *
   341     * grammar, such as a regular expression or a URL.
   341     * grammar, such as a regular expression or a URL.
   342     *
   342     *
   343     * <p>Since incomplete programs are being modeled, some of the
   343     * <p>Since incomplete programs are being modeled, some of the
   344     * parameters may only have partial information or may be {@code
   344     * parameters may only have partial information or may be {@code
   345     * null}.  At least one of {@code element} and {@code userText}
   345     * null}.  At least one of {@code element} and {@code userText}
   346     * must be non-{@code null}.  If {@code element} is non-{@code
   346     * must be non-{@code null}.  If {@code element} is non-{@code null},
   347     * null}, {@code annotation} and {@code member} may be {@code
   347     * {@code annotation} and {@code member} may be {@code
   348     * null}.  Processors may not throw a {@code NullPointerException}
   348     * null}.  Processors may not throw a {@code NullPointerException}
   349     * if some parameters are {@code null}; if a processor has no
   349     * if some parameters are {@code null}; if a processor has no
   350     * completions to offer based on the provided information, an
   350     * completions to offer based on the provided information, an
   351     * empty iterable can be returned.  The processor may also return
   351     * empty iterable can be returned.  The processor may also return
   352     * a single completion with an empty value string and a message
   352     * a single completion with an empty value string and a message