8283594: Improve docs of ElementScanner classes

Reviewed-by: jjg
This commit is contained in:
Joe Darcy 2022-03-24 00:57:54 +00:00
parent 8a044649bd
commit 1a84d7590a
5 changed files with 54 additions and 46 deletions

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2022, 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
@ -37,15 +37,16 @@ import static javax.lang.model.SourceVersion.*;
* appropriate for the {@link SourceVersion#RELEASE_14 RELEASE_14}
* source version.
*
* The <code>visit<i>Xyz</i></code> methods in this
* class scan their component elements by calling {@code scan} on
* their {@linkplain Element#getEnclosedElements enclosed elements},
* {@linkplain ExecutableElement#getParameters parameters}, etc., as
* indicated in the individual method specifications. A subclass can
* control the order elements are visited by overriding the
* <code>visit<i>Xyz</i></code> methods. Note that clients of a scanner
* may get the desired behavior be invoking {@code v.scan(e, p)} rather
* than {@code v.visit(e, p)} on the root objects of interest.
* The <code>visit<i>Xyz</i></code> methods in this class scan their
* component elements by calling {@link ElementScanner6#scan(Element,
* Object) scan} on their {@linkplain Element#getEnclosedElements
* enclosed elements}, {@linkplain ExecutableElement#getParameters
* parameters}, etc., as indicated in the individual method
* specifications. A subclass can control the order elements are
* visited by overriding the <code>visit<i>Xyz</i></code> methods.
* Note that clients of a scanner may get the desired behavior by
* invoking {@code v.scan(e, p)} rather than {@code v.visit(e, p)} on
* the root objects of interest.
*
* <p>When a subclass overrides a <code>visit<i>Xyz</i></code> method, the
* new method can cause the enclosed elements to be scanned in the

@ -35,14 +35,16 @@ import static javax.lang.model.SourceVersion.*;
* A scanning visitor of program elements with default behavior
* appropriate for the {@link SourceVersion#RELEASE_6 RELEASE_6}
* source version. The <code>visit<i>Xyz</i></code> methods in this
* class scan their component elements by calling {@code scan} on
* their {@linkplain Element#getEnclosedElements enclosed elements},
* {@linkplain ExecutableElement#getParameters parameters}, etc., as
* indicated in the individual method specifications. A subclass can
* control the order elements are visited by overriding the
* <code>visit<i>Xyz</i></code> methods. Note that clients of a scanner
* may get the desired behavior be invoking {@code v.scan(e, p)} rather
* than {@code v.visit(e, p)} on the root objects of interest.
* class scan their component elements by calling {@link
* #scan(Element, P) scan} on their {@linkplain
* Element#getEnclosedElements enclosed elements}, {@linkplain
* ExecutableElement#getParameters parameters}, etc., as indicated in
* the individual method specifications. A subclass can control the
* order elements are visited by overriding the
* <code>visit<i>Xyz</i></code> methods. Note that clients of a
* scanner may get the desired behavior by invoking {@code v.scan(e,
* p)} rather than {@code v.visit(e, p)} on the root objects of
* interest.
*
* <p>When a subclass overrides a <code>visit<i>Xyz</i></code> method, the
* new method can cause the enclosed elements to be scanned in the

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2022, 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
@ -35,14 +35,16 @@ import static javax.lang.model.SourceVersion.*;
* A scanning visitor of program elements with default behavior
* appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
* source version. The <code>visit<i>Xyz</i></code> methods in this
* class scan their component elements by calling {@code scan} on
* their {@linkplain Element#getEnclosedElements enclosed elements},
* {@linkplain ExecutableElement#getParameters parameters}, etc., as
* indicated in the individual method specifications. A subclass can
* control the order elements are visited by overriding the
* <code>visit<i>Xyz</i></code> methods. Note that clients of a scanner
* may get the desired behavior be invoking {@code v.scan(e, p)} rather
* than {@code v.visit(e, p)} on the root objects of interest.
* class scan their component elements by calling {@link
* ElementScanner6#scan(Element, Object) scan} on their {@linkplain
* Element#getEnclosedElements enclosed elements}, {@linkplain
* ExecutableElement#getParameters parameters}, etc., as indicated in
* the individual method specifications. A subclass can control the
* order elements are visited by overriding the
* <code>visit<i>Xyz</i></code> methods. Note that clients of a
* scanner may get the desired behavior by invoking {@code v.scan(e,
* p)} rather than {@code v.visit(e, p)} on the root objects of
* interest.
*
* <p>When a subclass overrides a <code>visit<i>Xyz</i></code> method, the
* new method can cause the enclosed elements to be scanned in the

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2022, 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
@ -35,14 +35,16 @@ import static javax.lang.model.SourceVersion.*;
* A scanning visitor of program elements with default behavior
* appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
* source version. The <code>visit<i>Xyz</i></code> methods in this
* class scan their component elements by calling {@code scan} on
* their {@linkplain Element#getEnclosedElements enclosed elements},
* {@linkplain ExecutableElement#getParameters parameters}, etc., as
* indicated in the individual method specifications. A subclass can
* control the order elements are visited by overriding the
* <code>visit<i>Xyz</i></code> methods. Note that clients of a scanner
* may get the desired behavior be invoking {@code v.scan(e, p)} rather
* than {@code v.visit(e, p)} on the root objects of interest.
* class scan their component elements by calling {@link
* ElementScanner6#scan(Element, Object) scan} on their {@linkplain
* Element#getEnclosedElements enclosed elements}, {@linkplain
* ExecutableElement#getParameters parameters}, etc., as indicated in
* the individual method specifications. A subclass can control the
* order elements are visited by overriding the
* <code>visit<i>Xyz</i></code> methods. Note that clients of a
* scanner may get the desired behavior by invoking {@code v.scan(e,
* p)} rather than {@code v.visit(e, p)} on the root objects of
* interest.
*
* <p>When a subclass overrides a <code>visit<i>Xyz</i></code> method, the
* new method can cause the enclosed elements to be scanned in the

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2022, 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
@ -36,15 +36,16 @@ import static javax.lang.model.SourceVersion.*;
* appropriate for source versions {@link SourceVersion#RELEASE_9
* RELEASE_9} through {@link SourceVersion#RELEASE_14 RELEASE_14}.
*
* The <code>visit<i>Xyz</i></code> methods in this
* class scan their component elements by calling {@code scan} on
* their {@linkplain Element#getEnclosedElements enclosed elements},
* {@linkplain ExecutableElement#getParameters parameters}, etc., as
* indicated in the individual method specifications. A subclass can
* control the order elements are visited by overriding the
* <code>visit<i>Xyz</i></code> methods. Note that clients of a scanner
* may get the desired behavior be invoking {@code v.scan(e, p)} rather
* than {@code v.visit(e, p)} on the root objects of interest.
* The <code>visit<i>Xyz</i></code> methods in this class scan their
* component elements by calling {@link ElementScanner6#scan(Element,
* Object) scan} on their {@linkplain Element#getEnclosedElements
* enclosed elements}, {@linkplain ExecutableElement#getParameters
* parameters}, etc., as indicated in the individual method
* specifications. A subclass can control the order elements are
* visited by overriding the <code>visit<i>Xyz</i></code> methods.
* Note that clients of a scanner may get the desired behavior by
* invoking {@code v.scan(e, p)} rather than {@code v.visit(e, p)} on
* the root objects of interest.
*
* <p>When a subclass overrides a <code>visit<i>Xyz</i></code> method, the
* new method can cause the enclosed elements to be scanned in the