Skip to content

Commit 6b5958d

Browse files
committed
8339696: Clarify modeling scope of javax.lang.model.element
Reviewed-by: jjg, jlahoda, prappo
1 parent 77468c2 commit 6b5958d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/java.compiler/share/classes/javax/lang/model/element/package-info.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -32,9 +32,15 @@
3232
* The interfaces in this package do not model the structure of a
3333
* program inside a method body; for example there is no
3434
* representation of a {@code for} loop or {@code try}-{@code finally}
35-
* block. However, the interfaces can model some structures only
36-
* appearing inside method bodies, such as local variables and
37-
* anonymous classes.
35+
* block. Concretely, there is no model of any abstract syntax tree
36+
* (AST) structure of a Java program. However, the interfaces can
37+
* model some structures only appearing inside method bodies, such as
38+
* {@linkplain ElementKind#LOCAL_VARIABLE local variables},
39+
* {@linkplain NestingKind#ANONYMOUS anonymous classes}, and
40+
* {@linkplain ElementKind#EXCEPTION_PARAMETER exception parameters}.
41+
* Therefore, these interfaces can be used by an AST API to model the
42+
* declarations found in the method bodies of Java compilation units
43+
* (JLS {@jls 7.3}).
3844
*
3945
* <p id="accurate_model">When used in the context of annotation
4046
* processing, an accurate model of the element being represented must

0 commit comments

Comments
 (0)