mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 05:59:52 +00:00
8275368: Correct statement of kinds of elements Processor.process operates over
Reviewed-by: jlahoda
This commit is contained in:
parent
d548f2fc0d
commit
fb8e5cf4ec
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -322,15 +322,16 @@ public interface Processor {
|
||||
void init(ProcessingEnvironment processingEnv);
|
||||
|
||||
/**
|
||||
* Processes a set of annotation interfaces on type elements
|
||||
* originating from the prior round and returns whether or not
|
||||
* these annotation interfaces are claimed by this processor. If {@code
|
||||
* true} is returned, the annotation interfaces are claimed and subsequent
|
||||
* processors will not be asked to process them; if {@code false}
|
||||
* is returned, the annotation interfaces are unclaimed and subsequent
|
||||
* processors may be asked to process them. A processor may
|
||||
* always return the same boolean value or may vary the result
|
||||
* based on its own chosen criteria.
|
||||
* Processes a set of annotation interfaces on {@linkplain
|
||||
* RoundEnvironment#getRootElements() root elements} originating
|
||||
* from the prior round and returns whether or not these
|
||||
* annotation interfaces are claimed by this processor. If {@code
|
||||
* true} is returned, the annotation interfaces are claimed and
|
||||
* subsequent processors will not be asked to process them; if
|
||||
* {@code false} is returned, the annotation interfaces are
|
||||
* unclaimed and subsequent processors may be asked to process
|
||||
* them. A processor may always return the same boolean value or
|
||||
* may vary the result based on its own chosen criteria.
|
||||
*
|
||||
* <p>The input set will be empty if the processor supports {@code
|
||||
* "*"} and the root elements have no annotations. A {@code
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,8 +25,7 @@
|
||||
|
||||
package javax.annotation.processing;
|
||||
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.element.*;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
@ -58,8 +57,15 @@ public interface RoundEnvironment {
|
||||
boolean errorRaised();
|
||||
|
||||
/**
|
||||
* Returns the {@linkplain Processor root elements} for annotation processing generated
|
||||
* by the prior round.
|
||||
* Returns the {@linkplain Processor root elements} for annotation
|
||||
* processing {@linkplain Filer generated} by the prior round.
|
||||
*
|
||||
* @apiNote
|
||||
* Root elements correspond to the top-level declarations in
|
||||
* compilation units (JLS section {@jls 7.3}). Root elements are
|
||||
* most commonly {@linkplain TypeElement types}, but can also be
|
||||
* {@linkplain PackageElement packages} or {@linkplain
|
||||
* ModuleElement modules}.
|
||||
*
|
||||
* @return the root elements for annotation processing generated
|
||||
* by the prior round, or an empty set if there were none
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user