8248983: Add links to definition of empty name
Reviewed-by: forax, jjg, jlaskey
This commit is contained in:
parent
9bac33fbc6
commit
5c76194ae9
@ -137,7 +137,8 @@ public interface Element extends javax.lang.model.AnnotatedConstruct {
|
||||
*
|
||||
* If this element represents an unnamed {@linkplain
|
||||
* PackageElement#getSimpleName package} or unnamed {@linkplain
|
||||
* ModuleElement#getSimpleName module}, an empty name is returned.
|
||||
* ModuleElement#getSimpleName module}, an <a
|
||||
* href=Name.html#empty_name>empty name</a> is returned.
|
||||
*
|
||||
* If it represents a {@linkplain ExecutableElement#getSimpleName
|
||||
* constructor}, the name "{@code <init>}" is returned. If it
|
||||
@ -146,7 +147,8 @@ public interface Element extends javax.lang.model.AnnotatedConstruct {
|
||||
*
|
||||
* If it represents an {@linkplain TypeElement#getSimpleName
|
||||
* anonymous class} or {@linkplain ExecutableElement#getSimpleName
|
||||
* instance initializer}, an empty name is returned.
|
||||
* instance initializer}, an <a href=Name.html#empty_name>empty
|
||||
* name</a> is returned.
|
||||
*
|
||||
* @return the simple name of this element
|
||||
* @see PackageElement#getSimpleName
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2020, 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
|
||||
@ -146,7 +146,8 @@ public interface ExecutableElement extends Element, Parameterizable {
|
||||
* initializer. For a constructor, the name {@code "<init>"} is
|
||||
* returned, for a static initializer, the name {@code "<clinit>"}
|
||||
* is returned, and for an anonymous class or instance
|
||||
* initializer, an empty name is returned.
|
||||
* initializer, an <a href=Name.html#empty_name>empty name</a> is
|
||||
* returned.
|
||||
*
|
||||
* @return the simple name of a constructor, method, or
|
||||
* initializer
|
||||
|
@ -51,7 +51,8 @@ public interface ModuleElement extends Element, QualifiedNameable {
|
||||
|
||||
/**
|
||||
* Returns the fully qualified name of this module. For an
|
||||
* {@linkplain #isUnnamed() unnamed module}, an empty name is returned.
|
||||
* {@linkplain #isUnnamed() unnamed module}, an <a
|
||||
* href=Name.html#empty_name>empty name</a> is returned.
|
||||
*
|
||||
* @apiNote If the module name consists of one identifier, then
|
||||
* this method returns that identifier, which is deemed to be
|
||||
@ -69,7 +70,8 @@ public interface ModuleElement extends Element, QualifiedNameable {
|
||||
|
||||
/**
|
||||
* Returns the simple name of this module. For an {@linkplain
|
||||
* #isUnnamed() unnamed module}, an empty name is returned.
|
||||
* #isUnnamed() unnamed module}, an <a
|
||||
* href=Name.html#empty_name>empty name</a> is returned.
|
||||
*
|
||||
* @apiNote If the module name consists of one identifier, then
|
||||
* this method returns that identifier. If the module name
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2020, 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
|
||||
@ -33,7 +33,9 @@ package javax.lang.model.element;
|
||||
* implementation are usable in collections while {@code Name}s from
|
||||
* different implementations may not work properly in collections.
|
||||
*
|
||||
* <p>An empty {@code Name} has a length of zero.
|
||||
* <p id="empty_name">An {@linkplain CharSequence#isEmpty() empty}
|
||||
* {@code Name} has a {@linkplain CharSequence#length() length} of
|
||||
* zero.
|
||||
*
|
||||
* <p>In the context of {@linkplain
|
||||
* javax.annotation.processing.ProcessingEnvironment annotation
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2020, 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
|
||||
@ -51,9 +51,10 @@ public interface PackageElement extends Element, QualifiedNameable {
|
||||
TypeMirror asType();
|
||||
|
||||
/**
|
||||
* Returns the fully qualified name of this package.
|
||||
* This is also known as the package's <i>canonical</i> name.
|
||||
* For an {@linkplain #isUnnamed() unnamed package}, an empty name is returned.
|
||||
* Returns the fully qualified name of this package. This is also
|
||||
* known as the package's <i>canonical</i> name. For an
|
||||
* {@linkplain #isUnnamed() unnamed package}, an <a
|
||||
* href=Name.html#empty_name>empty name</a> is returned.
|
||||
*
|
||||
* @apiNote The fully qualified name of a named package that is
|
||||
* not a subpackage of a named package is its simple name. The
|
||||
@ -70,7 +71,8 @@ public interface PackageElement extends Element, QualifiedNameable {
|
||||
|
||||
/**
|
||||
* Returns the simple name of this package. For an {@linkplain
|
||||
* #isUnnamed() unnamed package}, an empty name is returned.
|
||||
* #isUnnamed() unnamed package}, an <a
|
||||
* href=Name.html#empty_name>empty name</a> is returned.
|
||||
*
|
||||
* @return the simple name of this package or an empty name if
|
||||
* this is an unnamed package
|
||||
|
@ -118,10 +118,10 @@ public interface TypeElement extends Element, Parameterizable, QualifiedNameable
|
||||
NestingKind getNestingKind();
|
||||
|
||||
/**
|
||||
* Returns the fully qualified name of this type element.
|
||||
* More precisely, it returns the <i>canonical</i> name.
|
||||
* For local and anonymous classes, which do not have canonical names,
|
||||
* an empty name is returned.
|
||||
* Returns the fully qualified name of this type element. More
|
||||
* precisely, it returns the <i>canonical</i> name. For local and
|
||||
* anonymous classes, which do not have canonical names, an <a
|
||||
* href=Name.html#empty_name>empty name</a> is returned.
|
||||
*
|
||||
* <p>The name of a generic type does not include any reference
|
||||
* to its formal type parameters.
|
||||
@ -141,7 +141,8 @@ public interface TypeElement extends Element, Parameterizable, QualifiedNameable
|
||||
/**
|
||||
* Returns the simple name of this type element.
|
||||
*
|
||||
* For an anonymous class, an empty name is returned.
|
||||
* For an anonymous class, an <a href=Name.html#empty_name> empty
|
||||
* name</a> is returned.
|
||||
*
|
||||
* @return the simple name of this class or interface,
|
||||
* an empty name for an anonymous class
|
||||
|
Loading…
Reference in New Issue
Block a user