+1 > On Jun 6, 2019, at 8:38 PM, Joe Darcy <joe.da...@oracle.com> wrote: > > Hello, > > Receiver types are an obscure corner of the Java language added as part of > type annotations. The API methods in core reflection and javax.lang.model > that refer to receiver types should cross-reference the relevant JLS sections > using @jls javadoc tags. > > Please review the patch below to add those @jls tags. > > Thanks, > > -Joe > > > diff -r 830ca7b43b95 > src/java.base/share/classes/java/lang/reflect/Executable.java > --- a/src/java.base/share/classes/java/lang/reflect/Executable.java Thu Jun > 06 12:24:44 2019 -0300 > +++ b/src/java.base/share/classes/java/lang/reflect/Executable.java Thu Jun > 06 17:34:22 2019 -0700 > @@ -673,6 +673,10 @@ > * @return an object representing the receiver type of the method or > * constructor represented by this {@code Executable} or {@code null} if > * this {@code Executable} can not have a receiver parameter > + * > + * @jls 8.4 Method Declarations > + * @jls 8.4.1 Formal Parameters > + * @jls 8.8 Constructor Declarations > */ > public AnnotatedType getAnnotatedReceiverType() { > if (Modifier.isStatic(this.getModifiers())) > diff -r 830ca7b43b95 > src/java.compiler/share/classes/javax/lang/model/element/ExecutableElement.java > --- > a/src/java.compiler/share/classes/javax/lang/model/element/ExecutableElement.java > Thu Jun 06 12:24:44 2019 -0300 > +++ > b/src/java.compiler/share/classes/javax/lang/model/element/ExecutableElement.java > Thu Jun 06 17:34:22 2019 -0700 > @@ -95,6 +95,10 @@ > * > * @return the receiver type of this executable > * @since 1.8 > + * > + * @jls 8.4 Method Declarations > + * @jls 8.4.1 Formal Parameters > + * @jls 8.8 Constructor Declarations > */ > TypeMirror getReceiverType(); > > diff -r 830ca7b43b95 > src/java.compiler/share/classes/javax/lang/model/type/ExecutableType.java > --- > a/src/java.compiler/share/classes/javax/lang/model/type/ExecutableType.java > Thu Jun 06 12:24:44 2019 -0300 > +++ > b/src/java.compiler/share/classes/javax/lang/model/type/ExecutableType.java > Thu Jun 06 17:34:22 2019 -0700 > @@ -92,6 +92,10 @@ > * > * @return the receiver type of this executable > * @since 1.8 > + * > + * @jls 8.4 Method Declarations > + * @jls 8.4.1 Formal Parameters > + * @jls 8.8 Constructor Declarations > */ > TypeMirror getReceiverType(); > >
<http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 lance.ander...@oracle.com <mailto:lance.ander...@oracle.com>