--- old/src/java.compiler/share/classes/javax/annotation/processing/Processor.java 2016-08-08 22:57:55.828135187 -0700 +++ new/src/java.compiler/share/classes/javax/annotation/processing/Processor.java 2016-08-08 22:57:55.728135184 -0700 @@ -115,7 +115,17 @@ * the root elements of a round. For this purpose, a type parameter is * considered to be enclosed by its {@linkplain * TypeParameterElement#getGenericElement generic - * element}. Annotations on {@linkplain + * element}. + + * For this purpose, a top-level type is not considered to be + * enclosed by its enclosing package. A root element representing a + * package is created when a {@code package-info} file is processed. + * Likewise, for this purpose, a package is not considered to + * be enclosed by its enclosing named module (if any). A root element + * representing a module is created when a {@code module-info} file is + * processed. + + * Annotations on {@linkplain * java.lang.annotation.ElementType#TYPE_USE type uses}, as opposed to * annotations on elements, are ignored when computing whether or not * an annotation type is present. @@ -235,12 +245,20 @@ * (fully qualified) name of a supported annotation type. * Alternately it may be of the form "name.*" * representing the set of all annotation types with canonical - * names beginning with "name.". Finally, {@code - * "*"} by itself represents the set of all annotation types, - * including the empty set. Note that a processor should not - * claim {@code "*"} unless it is actually processing all files; - * claiming unnecessary annotations may cause a performance - * slowdown in some environments. + * names beginning with "name.". + * + * In either of those cases, the name of the annotation type can be + * optionally be preceded by a module name followed by a {@code + * "/"} character. For example, if a processor supports {@code + * "a.B"}, this can include multiple annotation types named {@code + * a.B} which reside in different modules. To only support {@code + * a.B} in the {@code Foo} module, instead use {@code "Foo/a.B"}. + * + * Finally, {@code "*"} by itself represents the set of all + * annotation types, including the empty set. Note that a + * processor should not claim {@code "*"} unless it is actually + * processing all files; claiming unnecessary annotations may + * cause a performance slowdown in some environments. * *

Each string returned in the set must be accepted by the * following grammar: @@ -248,9 +266,13 @@ *

*
*
SupportedAnnotationTypeString: - *
TypeName DotStaropt + *
ModulePrefixopt TypeName DotStaropt *
* * + *
ModulePrefix: + *
TypeName / + *
+ * *
DotStar: *
. * *