RFR: 8374658: Consider use of "included" rather than "enclosed" in jx.a.p.Processor

Chen Liang liach at openjdk.org
Fri Jan 9 02:59:24 UTC 2026


On Wed, 7 Jan 2026 03:46:46 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> The use of "enclosed" in javax.annotation.processing.Processor looks to be using a more colloquial definition than the JLS-eque notion of "enclosed" used in parts of the javax.lang.model API.
> 
> Instead, this PR proposes to switch from "enclosed" to "included," a term already used in RoundEnvironment for the concept in question.

`RoundEnviroment` uses:

> Only package elements, module elements, and type elements <i>included</i> in this round of annotation processing, or declarations of members, constructors, parameters, type parameters, or record components declared within those, are returned.

I would recommend consistency, that we update "enclosed within" to "declared within" or update `RoundEnvironment`, while the other "enclosed" to "included" look good.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29076#issuecomment-3726822535


More information about the compiler-dev mailing list