8220249: fix headings in java.compiler

Reviewed-by: erikj, darcy
This commit is contained in:
Jonathan Gibbons 2019-03-20 15:35:26 -07:00
parent 7bb74f80da
commit 2df0f4b4dd
52 changed files with 250 additions and 250 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ package java.io;
* may be thrown if the input stream has been * may be thrown if the input stream has been
* closed. * closed.
* *
* <h3><a id="modified-utf-8">Modified UTF-8</a></h3> * <h2><a id="modified-utf-8">Modified UTF-8</a></h2>
* <p> * <p>
* Implementations of the DataInput and DataOutput interfaces represent * Implementations of the DataInput and DataOutput interfaces represent
* Unicode strings in a format that is a slight modification of UTF-8. * Unicode strings in a format that is a slight modification of UTF-8.

View file

@ -128,7 +128,7 @@ import sun.security.action.GetPropertyAction;
* created, the abstract pathname represented by a <code>File</code> object * created, the abstract pathname represented by a <code>File</code> object
* will never change. * will never change.
* *
* <h3>Interoperability with {@code java.nio.file} package</h3> * <h2>Interoperability with {@code java.nio.file} package</h2>
* *
* <p> The <a href="../../java/nio/file/package-summary.html">{@code java.nio.file}</a> * <p> The <a href="../../java/nio/file/package-summary.html">{@code java.nio.file}</a>
* package defines interfaces and classes for the Java virtual machine to access * package defines interfaces and classes for the Java virtual machine to access

View file

@ -44,7 +44,7 @@ import jdk.internal.misc.VM;
* and for converting characters from uppercase to lowercase and vice * and for converting characters from uppercase to lowercase and vice
* versa. * versa.
* *
* <h3><a id="conformance">Unicode Conformance</a></h3> * <h2><a id="conformance">Unicode Conformance</a></h2>
* <p> * <p>
* The fields and methods of class {@code Character} are defined in terms * The fields and methods of class {@code Character} are defined in terms
* of character information from the Unicode Standard, specifically the * of character information from the Unicode Standard, specifically the
@ -59,7 +59,7 @@ import jdk.internal.misc.VM;
* {@code U+32FF}, from the first version of the Unicode Standard * {@code U+32FF}, from the first version of the Unicode Standard
* after 11.0 that assigns the code point. * after 11.0 that assigns the code point.
* *
* <h3><a id="unicode">Unicode Character Representations</a></h3> * <h2><a id="unicode">Unicode Character Representations</a></h2>
* *
* <p>The {@code char} data type (and therefore the value that a * <p>The {@code char} data type (and therefore the value that a
* {@code Character} object encapsulates) are based on the * {@code Character} object encapsulates) are based on the

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -126,7 +126,7 @@ import sun.security.util.SecurityConstants;
* duration of the class loading process (see {@link #loadClass * duration of the class loading process (see {@link #loadClass
* loadClass} methods). * loadClass} methods).
* *
* <h3> <a id="builtinLoaders">Run-time Built-in Class Loaders</a></h3> * <h2> <a id="builtinLoaders">Run-time Built-in Class Loaders</a></h2>
* *
* The Java run-time has the following built-in class loaders: * The Java run-time has the following built-in class loaders:
* *

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -120,7 +120,7 @@ import sun.security.util.SecurityConstants;
* in this class causes a {@link NullPointerException NullPointerException} to * in this class causes a {@link NullPointerException NullPointerException} to
* be thrown. </p> * be thrown. </p>
* *
* <h3> Example usage: </h3> * <h2> Example usage: </h2>
* *
* <p> This example creates a configuration by resolving a module named * <p> This example creates a configuration by resolving a module named
* "{@code myapp}" with the configuration for the boot layer as the parent. It * "{@code myapp}" with the configuration for the boot layer as the parent. It

View file

@ -5,7 +5,7 @@
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head> </head>
<body> <body>
<h2 id="ValueBased">Value-based Classes</h2> <h1 id="ValueBased">Value-based Classes</h1>
Some classes, such as <code>java.util.Optional</code> and Some classes, such as <code>java.util.Optional</code> and
<code>java.time.LocalDateTime</code>, are <em>value-based</em>. Instances of a <code>java.time.LocalDateTime</code>, are <em>value-based</em>. Instances of a

View file

@ -1,6 +1,6 @@
<!doctype html> <!doctype html>
<!-- <!--
Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -29,9 +29,9 @@
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head> </head>
<body> <body>
<h2>Java Thread Primitive Deprecation</h2> <h1>Java Thread Primitive Deprecation</h1>
<hr> <hr>
<h3>Why is <code>Thread.stop</code> deprecated?</h3> <h2>Why is <code>Thread.stop</code> deprecated?</h2>
<p>Because it is inherently unsafe. Stopping a thread causes it to <p>Because it is inherently unsafe. Stopping a thread causes it to
unlock all the monitors that it has locked. (The monitors are unlock all the monitors that it has locked. (The monitors are
unlocked as the <code>ThreadDeath</code> exception propagates up unlocked as the <code>ThreadDeath</code> exception propagates up
@ -46,8 +46,8 @@ no warning that his program may be corrupted. The corruption can
manifest itself at any time after the actual damage occurs, even manifest itself at any time after the actual damage occurs, even
hours or days in the future.</p> hours or days in the future.</p>
<hr> <hr>
<h3>Couldn't I just catch the <code>ThreadDeath</code> exception <h2>Couldn't I just catch the <code>ThreadDeath</code> exception
and fix the damaged object?</h3> and fix the damaged object?</h2>
<p>In theory, perhaps, but it would <em>vastly</em> complicate the <p>In theory, perhaps, but it would <em>vastly</em> complicate the
task of writing correct multithreaded code. The task would be task of writing correct multithreaded code. The task would be
nearly insurmountable for two reasons:</p> nearly insurmountable for two reasons:</p>
@ -62,7 +62,7 @@ it succeeded. The code to ensure this would be quite complex.</li>
</ol> </ol>
In sum, it just isn't practical. In sum, it just isn't practical.
<hr> <hr>
<h3>What should I use instead of <code>Thread.stop</code>?</h3> <h2>What should I use instead of <code>Thread.stop</code>?</h2>
<p>Most uses of <code>stop</code> should be replaced by code that <p>Most uses of <code>stop</code> should be replaced by code that
simply modifies some variable to indicate that the target thread simply modifies some variable to indicate that the target thread
should stop running. The target thread should check this variable should stop running. The target thread should check this variable
@ -117,8 +117,8 @@ applet's <code>stop</code> and <code>run</code> methods with:
} }
</pre> </pre>
<hr> <hr>
<h3>How do I stop a thread that waits for long periods (e.g., for <h2>How do I stop a thread that waits for long periods (e.g., for
input)?</h3> input)?</h2>
<p>That's what the <code>Thread.interrupt</code> method is for. The <p>That's what the <code>Thread.interrupt</code> method is for. The
same "state based" signaling mechanism shown above can be used, but same "state based" signaling mechanism shown above can be used, but
the state change (<code>blinker = null</code>, in the previous the state change (<code>blinker = null</code>, in the previous
@ -145,8 +145,8 @@ following incantation:
This ensures that the Thread will reraise the This ensures that the Thread will reraise the
<code>InterruptedException</code> as soon as it is able. <code>InterruptedException</code> as soon as it is able.
<hr> <hr>
<h3>What if a thread doesn't respond to <h2>What if a thread doesn't respond to
<code>Thread.interrupt</code>?</h3> <code>Thread.interrupt</code>?</h2>
<p>In some cases, you can use application specific tricks. For <p>In some cases, you can use application specific tricks. For
example, if a thread is waiting on a known socket, you can close example, if a thread is waiting on a known socket, you can close
the socket to cause the thread to return immediately. the socket to cause the thread to return immediately.
@ -158,8 +158,8 @@ cases include deliberate denial-of-service attacks, and I/O
operations for which thread.stop and thread.interrupt do not work operations for which thread.stop and thread.interrupt do not work
properly.</p> properly.</p>
<hr> <hr>
<h3>Why are <code>Thread.suspend</code> and <h2>Why are <code>Thread.suspend</code> and
<code>Thread.resume</code> deprecated?</h3> <code>Thread.resume</code> deprecated?</h2>
<p><code>Thread.suspend</code> is inherently deadlock-prone. If the <p><code>Thread.suspend</code> is inherently deadlock-prone. If the
target thread holds a lock on the monitor protecting a critical target thread holds a lock on the monitor protecting a critical
system resource when it is suspended, no thread can access this system resource when it is suspended, no thread can access this
@ -168,8 +168,8 @@ would resume the target thread attempts to lock this monitor prior
to calling <code>resume</code>, deadlock results. Such deadlocks to calling <code>resume</code>, deadlock results. Such deadlocks
typically manifest themselves as "frozen" processes.</p> typically manifest themselves as "frozen" processes.</p>
<hr> <hr>
<h3>What should I use instead of <code>Thread.suspend</code> and <h2>What should I use instead of <code>Thread.suspend</code> and
<code>Thread.resume</code>?</h3> <code>Thread.resume</code>?</h2>
<p>As with <code>Thread.stop</code>, the prudent approach is to <p>As with <code>Thread.stop</code>, the prudent approach is to
have the "target thread" poll a variable indicating the desired have the "target thread" poll a variable indicating the desired
state of the thread (active or suspended). When the desired state state of the thread (active or suspended). When the desired state
@ -283,8 +283,8 @@ The resulting <code>run</code> method is:
} }
</pre> </pre>
<hr size="3" noshade="noshade" /> <hr size="3" noshade="noshade" />
<h3>Can I combine the two techniques to produce a thread that may <h2>Can I combine the two techniques to produce a thread that may
be safely "stopped" or "suspended"?</h3> be safely "stopped" or "suspended"?</h2>
Yes, it's reasonably straightforward. The one subtlety is that the Yes, it's reasonably straightforward. The one subtlety is that the
target thread may already be suspended at the time that another target thread may already be suspended at the time that another
thread tries to stop it. If the <code>stop</code> method merely sets thread tries to stop it. If the <code>stop</code> method merely sets

View file

@ -52,7 +52,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
* {@linkplain java.lang.invoke.MethodHandles#dropArguments deletion}, * {@linkplain java.lang.invoke.MethodHandles#dropArguments deletion},
* and {@linkplain java.lang.invoke.MethodHandles#filterArguments substitution}. * and {@linkplain java.lang.invoke.MethodHandles#filterArguments substitution}.
* *
* <h1>Method handle contents</h1> * <h2>Method handle contents</h2>
* Method handles are dynamically and strongly typed according to their parameter and return types. * Method handles are dynamically and strongly typed according to their parameter and return types.
* They are not distinguished by the name or the defining class of their underlying methods. * They are not distinguished by the name or the defining class of their underlying methods.
* A method handle must be invoked using a symbolic type descriptor which matches * A method handle must be invoked using a symbolic type descriptor which matches
@ -89,7 +89,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
* from its specific class, as the method handle class hierarchy (if any) * from its specific class, as the method handle class hierarchy (if any)
* may change from time to time or across implementations from different vendors. * may change from time to time or across implementations from different vendors.
* *
* <h1>Method handle compilation</h1> * <h2>Method handle compilation</h2>
* A Java method call expression naming {@code invokeExact} or {@code invoke} * A Java method call expression naming {@code invokeExact} or {@code invoke}
* can invoke a method handle from Java source code. * can invoke a method handle from Java source code.
* From the viewpoint of source code, these methods can take any arguments * From the viewpoint of source code, these methods can take any arguments
@ -121,7 +121,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
* The ambiguity with the type {@code Void} is harmless, since there are no references of type * The ambiguity with the type {@code Void} is harmless, since there are no references of type
* {@code Void} except the null reference. * {@code Void} except the null reference.
* *
* <h1>Method handle invocation</h1> * <h2>Method handle invocation</h2>
* The first time an {@code invokevirtual} instruction is executed * The first time an {@code invokevirtual} instruction is executed
* it is linked by symbolically resolving the names in the instruction * it is linked by symbolically resolving the names in the instruction
* and verifying that the method call is statically legal. * and verifying that the method call is statically legal.
@ -164,7 +164,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
* (<em>Note:</em> The adjusted method handle {@code M2} is not directly observable, * (<em>Note:</em> The adjusted method handle {@code M2} is not directly observable,
* and implementations are therefore not required to materialize it.) * and implementations are therefore not required to materialize it.)
* *
* <h1>Invocation checking</h1> * <h2>Invocation checking</h2>
* In typical programs, method handle type matching will usually succeed. * In typical programs, method handle type matching will usually succeed.
* But if a match fails, the JVM will throw a {@link WrongMethodTypeException}, * But if a match fails, the JVM will throw a {@link WrongMethodTypeException},
* either directly (in the case of {@code invokeExact}) or indirectly as if * either directly (in the case of {@code invokeExact}) or indirectly as if
@ -205,7 +205,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
* They should not be passed to untrusted code unless their use from * They should not be passed to untrusted code unless their use from
* the untrusted code would be harmless. * the untrusted code would be harmless.
* *
* <h1>Method handle creation</h1> * <h2>Method handle creation</h2>
* Java code can create a method handle that directly accesses * Java code can create a method handle that directly accesses
* any method, constructor, or field that is accessible to that code. * any method, constructor, or field that is accessible to that code.
* This is done via a reflective, capability-based API called * This is done via a reflective, capability-based API called
@ -263,7 +263,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
* of an {@code invokevirtual} or {@code invokeinterface} instruction on * of an {@code invokevirtual} or {@code invokeinterface} instruction on
* a private method (as applicable). * a private method (as applicable).
* *
* <h1>Usage examples</h1> * <h2>Usage examples</h2>
* Here are some examples of usage: * Here are some examples of usage:
* <blockquote><pre>{@code * <blockquote><pre>{@code
Object x, y; String s; int i; Object x, y; String s; int i;
@ -309,7 +309,7 @@ mh.invokeExact(System.out, "Hello, world.");
* be a method which calls {@link java.util.Objects#equals(Object,Object) Objects.equals} * be a method which calls {@link java.util.Objects#equals(Object,Object) Objects.equals}
* on its arguments, and asserts that the result is true. * on its arguments, and asserts that the result is true.
* *
* <h1>Exceptions</h1> * <h2>Exceptions</h2>
* The methods {@code invokeExact} and {@code invoke} are declared * The methods {@code invokeExact} and {@code invoke} are declared
* to throw {@link java.lang.Throwable Throwable}, * to throw {@link java.lang.Throwable Throwable},
* which is to say that there is no static restriction on what a method handle * which is to say that there is no static restriction on what a method handle
@ -322,7 +322,7 @@ mh.invokeExact(System.out, "Hello, world.");
* throwables locally, rethrowing only those which are legal in the context, * throwables locally, rethrowing only those which are legal in the context,
* and wrapping ones which are illegal. * and wrapping ones which are illegal.
* *
* <h1><a id="sigpoly"></a>Signature polymorphism</h1> * <h2><a id="sigpoly"></a>Signature polymorphism</h2>
* The unusual compilation and linkage behavior of * The unusual compilation and linkage behavior of
* {@code invokeExact} and plain {@code invoke} * {@code invokeExact} and plain {@code invoke}
* is referenced by the term <em>signature polymorphism</em>. * is referenced by the term <em>signature polymorphism</em>.
@ -347,7 +347,7 @@ mh.invokeExact(System.out, "Hello, world.");
* Tools which determine symbolic linkage are required to accept such * Tools which determine symbolic linkage are required to accept such
* untransformed descriptors, without reporting linkage errors. * untransformed descriptors, without reporting linkage errors.
* *
* <h1>Interoperation between method handles and the Core Reflection API</h1> * <h2>Interoperation between method handles and the Core Reflection API</h2>
* Using factory methods in the {@link java.lang.invoke.MethodHandles.Lookup Lookup} API, * Using factory methods in the {@link java.lang.invoke.MethodHandles.Lookup Lookup} API,
* any class member represented by a Core Reflection API object * any class member represented by a Core Reflection API object
* can be converted to a behaviorally equivalent method handle. * can be converted to a behaviorally equivalent method handle.
@ -389,7 +389,7 @@ mh.invokeExact(System.out, "Hello, world.");
* to call {@code invokeExact} or plain {@code invoke}, * to call {@code invokeExact} or plain {@code invoke},
* for any specified type descriptor . * for any specified type descriptor .
* *
* <h1>Interoperation between method handles and Java generics</h1> * <h2>Interoperation between method handles and Java generics</h2>
* A method handle can be obtained on a method, constructor, or field * A method handle can be obtained on a method, constructor, or field
* which is declared with Java generic types. * which is declared with Java generic types.
* As with the Core Reflection API, the type of the method handle * As with the Core Reflection API, the type of the method handle
@ -416,7 +416,7 @@ mh.invokeExact(System.out, "Hello, world.");
* genericity with a Java type parameter.</li> * genericity with a Java type parameter.</li>
* </ul> * </ul>
* *
* <h1><a id="maxarity"></a>Arity limits</h1> * <h2><a id="maxarity"></a>Arity limits</h2>
* The JVM imposes on all methods and constructors of any kind an absolute * The JVM imposes on all methods and constructors of any kind an absolute
* limit of 255 stacked arguments. This limit can appear more restrictive * limit of 255 stacked arguments. This limit can appear more restrictive
* in certain cases: * in certain cases:

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,7 +35,7 @@ import static java.lang.invoke.MethodHandleStatics.*;
* A symbolic reference obtained by cracking a direct method handle * A symbolic reference obtained by cracking a direct method handle
* into its consitutent symbolic parts. * into its consitutent symbolic parts.
* To crack a direct method handle, call {@link Lookup#revealDirect Lookup.revealDirect}. * To crack a direct method handle, call {@link Lookup#revealDirect Lookup.revealDirect}.
* <h1><a id="directmh"></a>Direct Method Handles</h1> * <h2><a id="directmh"></a>Direct Method Handles</h2>
* A <em>direct method handle</em> represents a method, constructor, or field without * A <em>direct method handle</em> represents a method, constructor, or field without
* any intervening argument bindings or other transformations. * any intervening argument bindings or other transformations.
* The method, constructor, or field referred to by a direct method handle is called * The method, constructor, or field referred to by a direct method handle is called
@ -58,7 +58,7 @@ import static java.lang.invoke.MethodHandleStatics.*;
* to convert a {@link Field} into a method handle. * to convert a {@link Field} into a method handle.
* </ul> * </ul>
* *
* <h1>Restrictions on Cracking</h1> * <h2>Restrictions on Cracking</h2>
* Given a suitable {@code Lookup} object, it is possible to crack any direct method handle * Given a suitable {@code Lookup} object, it is possible to crack any direct method handle
* to recover a symbolic reference for the underlying method, constructor, or field. * to recover a symbolic reference for the underlying method, constructor, or field.
* Cracking must be done via a {@code Lookup} object equivalent to that which created * Cracking must be done via a {@code Lookup} object equivalent to that which created
@ -77,7 +77,7 @@ import static java.lang.invoke.MethodHandleStatics.*;
* handle with symbolic information (or caller binding) from an unexpected scope. * handle with symbolic information (or caller binding) from an unexpected scope.
* Use {@link java.lang.invoke.MethodHandles#reflectAs} to override this limitation. * Use {@link java.lang.invoke.MethodHandles#reflectAs} to override this limitation.
* *
* <h1><a id="refkinds"></a>Reference kinds</h1> * <h2><a id="refkinds"></a>Reference kinds</h2>
* The <a href="MethodHandles.Lookup.html#lookups">Lookup Factory Methods</a> * The <a href="MethodHandles.Lookup.html#lookups">Lookup Factory Methods</a>
* correspond to all major use cases for methods, constructors, and fields. * correspond to all major use cases for methods, constructors, and fields.
* These use cases may be distinguished using small integers as follows: * These use cases may be distinguished using small integers as follows:

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -268,7 +268,7 @@ public class MethodHandles {
* This includes all methods, constructors, and fields which are allowed to the lookup class, * This includes all methods, constructors, and fields which are allowed to the lookup class,
* even private ones. * even private ones.
* *
* <h1><a id="lookups"></a>Lookup Factory Methods</h1> * <h2><a id="lookups"></a>Lookup Factory Methods</h2>
* The factory methods on a {@code Lookup} object correspond to all major * The factory methods on a {@code Lookup} object correspond to all major
* use cases for methods, constructors, and fields. * use cases for methods, constructors, and fields.
* Each method handle created by a factory method is the functional * Each method handle created by a factory method is the functional
@ -395,7 +395,7 @@ public class MethodHandles {
* <a href="MethodHandle.html#maxarity">too many parameters.</a> * <a href="MethodHandle.html#maxarity">too many parameters.</a>
* </ul> * </ul>
* *
* <h1><a id="access"></a>Access checking</h1> * <h2><a id="access"></a>Access checking</h2>
* Access checks are applied in the factory methods of {@code Lookup}, * Access checks are applied in the factory methods of {@code Lookup},
* when a method handle is created. * when a method handle is created.
* This is a key difference from the Core Reflection API, since * This is a key difference from the Core Reflection API, since
@ -529,7 +529,7 @@ public class MethodHandles {
* whose <a href="MethodHandles.Lookup.html#equiv">bytecode behaviors</a> and Java language access permissions * whose <a href="MethodHandles.Lookup.html#equiv">bytecode behaviors</a> and Java language access permissions
* can be reliably determined and emulated by method handles. * can be reliably determined and emulated by method handles.
* *
* <h1><a id="secmgr"></a>Security manager interactions</h1> * <h2><a id="secmgr"></a>Security manager interactions</h2>
* Although bytecode instructions can only refer to classes in * Although bytecode instructions can only refer to classes in
* a related class loader, this API can search for methods in any * a related class loader, this API can search for methods in any
* class, as long as a reference to its {@code Class} object is * class, as long as a reference to its {@code Class} object is
@ -588,7 +588,7 @@ public class MethodHandles {
* or else that is being accessed from a lookup class that has * or else that is being accessed from a lookup class that has
* rights to access the member or class. * rights to access the member or class.
* *
* <h1><a id="callsens"></a>Caller sensitive methods</h1> * <h2><a id="callsens"></a>Caller sensitive methods</h2>
* A small number of Java methods have a special property called caller sensitivity. * A small number of Java methods have a special property called caller sensitivity.
* A <em>caller-sensitive</em> method can behave differently depending on the * A <em>caller-sensitive</em> method can behave differently depending on the
* identity of its immediate caller. * identity of its immediate caller.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -197,7 +197,7 @@ public class MutableCallSite extends CallSite {
* processed before the method returns abnormally. * processed before the method returns abnormally.
* Which elements these are (if any) is implementation-dependent. * Which elements these are (if any) is implementation-dependent.
* *
* <h1>Java Memory Model details</h1> * <h4>Java Memory Model details</h4>
* In terms of the Java Memory Model, this operation performs a synchronization * In terms of the Java Memory Model, this operation performs a synchronization
* action which is comparable in effect to the writing of a volatile variable * action which is comparable in effect to the writing of a volatile variable
* by the current thread, and an eventual volatile read by every other thread * by the current thread, and an eventual volatile read by every other thread

View file

@ -234,7 +234,7 @@ import static java.lang.invoke.MethodHandleStatics.UNSAFE;
* precise phrasing of the specification of access mode methods and memory fence * precise phrasing of the specification of access mode methods and memory fence
* methods may accompany future updates of the Java Language Specification. * methods may accompany future updates of the Java Language Specification.
* *
* <h1>Compiling invocation of access mode methods</h1> * <h2>Compiling invocation of access mode methods</h2>
* A Java method call expression naming an access mode method can invoke a * A Java method call expression naming an access mode method can invoke a
* VarHandle from Java source code. From the viewpoint of source code, these * VarHandle from Java source code. From the viewpoint of source code, these
* methods can take any arguments and their polymorphic result (if expressed) * methods can take any arguments and their polymorphic result (if expressed)
@ -266,7 +266,7 @@ import static java.lang.invoke.MethodHandleStatics.UNSAFE;
* except the null reference. * except the null reference.
* *
* *
* <h1><a id="invoke">Performing invocation of access mode methods</a></h1> * <h2><a id="invoke">Performing invocation of access mode methods</a></h2>
* The first time an {@code invokevirtual} instruction is executed it is linked * The first time an {@code invokevirtual} instruction is executed it is linked
* by symbolically resolving the names in the instruction and verifying that * by symbolically resolving the names in the instruction and verifying that
* the method call is statically legal. This also holds for calls to access mode * the method call is statically legal. This also holds for calls to access mode
@ -329,7 +329,7 @@ import static java.lang.invoke.MethodHandleStatics.UNSAFE;
* Where, in this case, the method handle is bound to the VarHandle instance. * Where, in this case, the method handle is bound to the VarHandle instance.
* *
* *
* <h1>Invocation checking</h1> * <h2>Invocation checking</h2>
* In typical programs, VarHandle access mode type matching will usually * In typical programs, VarHandle access mode type matching will usually
* succeed. But if a match fails, the JVM will throw a * succeed. But if a match fails, the JVM will throw a
* {@link WrongMethodTypeException}. * {@link WrongMethodTypeException}.
@ -364,7 +364,7 @@ import static java.lang.invoke.MethodHandleStatics.UNSAFE;
* untrusted code unless their use from the untrusted code would be harmless. * untrusted code unless their use from the untrusted code would be harmless.
* *
* *
* <h1>VarHandle creation</h1> * <h2>VarHandle creation</h2>
* Java code can create a VarHandle that directly accesses any field that is * Java code can create a VarHandle that directly accesses any field that is
* accessible to that code. This is done via a reflective, capability-based * accessible to that code. This is done via a reflective, capability-based
* API called {@link java.lang.invoke.MethodHandles.Lookup * API called {@link java.lang.invoke.MethodHandles.Lookup
@ -383,7 +383,7 @@ import static java.lang.invoke.MethodHandleStatics.UNSAFE;
* class outside the current package, the receiver argument will be narrowed to * class outside the current package, the receiver argument will be narrowed to
* the type of the accessing class. * the type of the accessing class.
* *
* <h1>Interoperation between VarHandles and the Core Reflection API</h1> * <h2>Interoperation between VarHandles and the Core Reflection API</h2>
* Using factory methods in the {@link java.lang.invoke.MethodHandles.Lookup * Using factory methods in the {@link java.lang.invoke.MethodHandles.Lookup
* Lookup} API, any field represented by a Core Reflection API object * Lookup} API, any field represented by a Core Reflection API object
* can be converted to a behaviorally equivalent VarHandle. * can be converted to a behaviorally equivalent VarHandle.
@ -428,7 +428,7 @@ import static java.lang.invoke.MethodHandleStatics.UNSAFE;
* any specified access mode type and is equivalent in behaviour to * any specified access mode type and is equivalent in behaviour to
* {@link java.lang.invoke.MethodHandles#varHandleInvoker}. * {@link java.lang.invoke.MethodHandles#varHandleInvoker}.
* *
* <h1>Interoperation between VarHandles and Java generics</h1> * <h2>Interoperation between VarHandles and Java generics</h2>
* A VarHandle can be obtained for a variable, such as a field, which is * A VarHandle can be obtained for a variable, such as a field, which is
* declared with Java generic types. As with the Core Reflection API, the * declared with Java generic types. As with the Core Reflection API, the
* VarHandle's variable type will be constructed from the erasure of the * VarHandle's variable type will be constructed from the erasure of the

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -53,12 +53,12 @@
* </li> * </li>
* </ul> * </ul>
* *
* <h1><a id="jvm_mods"></a>Dynamic resolution of call sites and constants</h1> * <h2><a id="jvm_mods"></a>Dynamic resolution of call sites and constants</h2>
* The following low-level information summarizes relevant parts of the * The following low-level information summarizes relevant parts of the
* Java Virtual Machine specification. For full details, please see the * Java Virtual Machine specification. For full details, please see the
* current version of that specification. * current version of that specification.
* *
* <h2><a id="indyinsn"></a>Dynamically-computed call sites</h2> * <h3><a id="indyinsn"></a>Dynamically-computed call sites</h3>
* An {@code invokedynamic} instruction is originally in an unlinked state. * An {@code invokedynamic} instruction is originally in an unlinked state.
* In this state, there is no target method for the instruction to invoke. * In this state, there is no target method for the instruction to invoke.
* <p> * <p>
@ -74,7 +74,7 @@
* The constant pool reference also specifies the invocation's name and method type descriptor, * The constant pool reference also specifies the invocation's name and method type descriptor,
* just like {@code invokestatic} and the other invoke instructions. * just like {@code invokestatic} and the other invoke instructions.
* *
* <h2><a id="condycon"></a>Dynamically-computed constants</h2> * <h3><a id="condycon"></a>Dynamically-computed constants</h3>
* The constant pool may contain constants tagged {@code CONSTANT_Dynamic}, * The constant pool may contain constants tagged {@code CONSTANT_Dynamic},
* equipped with bootstrap methods which perform their resolution. * equipped with bootstrap methods which perform their resolution.
* Such a <em>dynamic constant</em> is originally in an unresolved state. * Such a <em>dynamic constant</em> is originally in an unresolved state.
@ -90,7 +90,7 @@
* (Roughly speaking, a dynamically-computed constant is to a dynamically-computed call site * (Roughly speaking, a dynamically-computed constant is to a dynamically-computed call site
* as a {@code CONSTANT_Fieldref} is to a {@code CONSTANT_Methodref}.) * as a {@code CONSTANT_Fieldref} is to a {@code CONSTANT_Methodref}.)
* *
* <h2><a id="bsm"></a>Execution of bootstrap methods</h2> * <h3><a id="bsm"></a>Execution of bootstrap methods</h3>
* Resolving a dynamically-computed call site or constant * Resolving a dynamically-computed call site or constant
* starts with resolving constants from the constant pool for the * starts with resolving constants from the constant pool for the
* following items: * following items:
@ -136,7 +136,7 @@
* subsequent attempts to execute the {@code invokedynamic} instruction or load the * subsequent attempts to execute the {@code invokedynamic} instruction or load the
* dynamically-computed constant. * dynamically-computed constant.
* *
* <h2>Timing of resolution</h2> * <h3>Timing of resolution</h3>
* An {@code invokedynamic} instruction is linked just before its first execution. * An {@code invokedynamic} instruction is linked just before its first execution.
* A dynamically-computed constant is resolved just before the first time it is used * A dynamically-computed constant is resolved just before the first time it is used
* (by pushing it on the stack or linking it as a bootstrap method parameter). * (by pushing it on the stack or linking it as a bootstrap method parameter).
@ -171,7 +171,7 @@
* just before its first invocation. * just before its first invocation.
* There is no way to undo the effect of a completed bootstrap method call. * There is no way to undo the effect of a completed bootstrap method call.
* *
* <h2>Types of bootstrap methods</h2> * <h3>Types of bootstrap methods</h3>
* For a dynamically-computed call site, the bootstrap method is invoked with parameter * For a dynamically-computed call site, the bootstrap method is invoked with parameter
* types {@code MethodHandles.Lookup}, {@code String}, {@code MethodType}, and the types * types {@code MethodHandles.Lookup}, {@code String}, {@code MethodType}, and the types
* of any static arguments; the return type is {@code CallSite}. * of any static arguments; the return type is {@code CallSite}.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -75,7 +75,7 @@ import jdk.internal.vm.annotation.Stable;
* ModuleLayer.boot().configuration()}. The configuration for the boot layer * ModuleLayer.boot().configuration()}. The configuration for the boot layer
* will often be the parent when creating new configurations. </p> * will often be the parent when creating new configurations. </p>
* *
* <h3> Example </h3> * <h2> Example </h2>
* *
* <p> The following example uses the {@link * <p> The following example uses the {@link
* #resolve(ModuleFinder,ModuleFinder,Collection) resolve} method to resolve a * #resolve(ModuleFinder,ModuleFinder,Collection) resolve} method to resolve a

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,7 +34,7 @@
* will cause a {@code NullPointerException}, unless otherwise specified. </p> * will cause a {@code NullPointerException}, unless otherwise specified. </p>
* *
* *
* <h1><a id="resolution"></a>{@index "Module Resolution"}</h1> * <h2><a id="resolution"></a>{@index "Module Resolution"}</h2>
* *
* <p> Resolution is the process of computing how modules depend on each other. * <p> Resolution is the process of computing how modules depend on each other.
* The process occurs at compile time and run time. </p> * The process occurs at compile time and run time. </p>
@ -45,7 +45,7 @@
* The readability graph embodies how modules depend on each other, which in * The readability graph embodies how modules depend on each other, which in
* turn controls access across module boundaries. </p> * turn controls access across module boundaries. </p>
* *
* <h2> Step 1: Recursive enumeration </h2> * <h3> Step 1: Recursive enumeration </h3>
* *
* <p> Recursive enumeration takes a set of module names, looks up each of their * <p> Recursive enumeration takes a set of module names, looks up each of their
* module declarations, and for each module declaration, recursively enumerates: * module declarations, and for each module declaration, recursively enumerates:
@ -91,7 +91,7 @@
* *
* <p> Otherwise, resolution proceeds to step 2. </p> * <p> Otherwise, resolution proceeds to step 2. </p>
* *
* <h2> Step 2: Computing the readability graph </h2> * <h3> Step 2: Computing the readability graph </h3>
* *
* <p> A 'requires' directive (irrespective of 'transitive') expresses that * <p> A 'requires' directive (irrespective of 'transitive') expresses that
* one module depends on some other module. The effect of the 'transitive' * one module depends on some other module. The effect of the 'transitive'
@ -147,7 +147,7 @@
* <p> Otherwise, resolution succeeds, and the result of resolution is the * <p> Otherwise, resolution succeeds, and the result of resolution is the
* readability graph. * readability graph.
* *
* <h2> Root modules </h2> * <h3> Root modules </h3>
* *
* <p> The set of root modules at compile-time is usually the set of modules * <p> The set of root modules at compile-time is usually the set of modules
* being compiled. At run-time, the set of root modules is usually the * being compiled. At run-time, the set of root modules is usually the
@ -158,7 +158,7 @@
* that is observable on the upgrade module path or among the system modules, * that is observable on the upgrade module path or among the system modules,
* and that exports at least one package without qualification. </p> * and that exports at least one package without qualification. </p>
* *
* <h2> Observable modules </h2> * <h3> Observable modules </h3>
* *
* <p> The set of observable modules at both compile-time and run-time is * <p> The set of observable modules at both compile-time and run-time is
* determined by searching several different paths, and also by searching * determined by searching several different paths, and also by searching
@ -183,7 +183,7 @@
* *
* </ol> * </ol>
* *
* <h2> 'requires' directives with 'static' modifier </h2> * <h3> 'requires' directives with 'static' modifier </h3>
* *
* <p> 'requires' directives that have the 'static' modifier express an optional * <p> 'requires' directives that have the 'static' modifier express an optional
* dependence at run time. If a module declares that it 'requires static M' then * dependence at run time. If a module declares that it 'requires static M' then
@ -191,7 +191,7 @@
* However, if M is recursively enumerated at step 1 then all modules that are * However, if M is recursively enumerated at step 1 then all modules that are
* enumerated and `requires static M` will read M. </p> * enumerated and `requires static M` will read M. </p>
* *
* <h2> Completeness </h2> * <h3> Completeness </h3>
* *
* <p> Resolution may be partial at compile-time in that the complete transitive * <p> Resolution may be partial at compile-time in that the complete transitive
* closure may not be required to compile a set of modules. Minimally, the * closure may not be required to compile a set of modules. Minimally, the

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -156,7 +156,7 @@ import static java.lang.module.ModuleDescriptor.Modifier.SYNTHETIC;
* like they do for instances of {@code java.lang.Object}. * like they do for instances of {@code java.lang.Object}.
* </ul> * </ul>
* *
* <h3><a id="membership">Package and Module Membership of Proxy Class</a></h3> * <h2><a id="membership">Package and Module Membership of Proxy Class</a></h2>
* *
* The package and module to which a proxy class belongs are chosen such that * The package and module to which a proxy class belongs are chosen such that
* the accessibility of the proxy class is in line with the accessibility of * the accessibility of the proxy class is in line with the accessibility of

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,7 +36,7 @@ import java.io.ObjectStreamException;
* and <a href="http://www.ietf.org/rfc/rfc2365.txt"><i>RFC&nbsp;2365: * and <a href="http://www.ietf.org/rfc/rfc2365.txt"><i>RFC&nbsp;2365:
* Administratively Scoped IP Multicast</i></a> * Administratively Scoped IP Multicast</i></a>
* *
* <h3> <a id="format">Textual representation of IP addresses</a> </h3> * <h2> <a id="format">Textual representation of IP addresses</a> </h2>
* *
* Textual representation of IPv4 address used as input to methods * Textual representation of IPv4 address used as input to methods
* takes one of the following forms: * takes one of the following forms:
@ -70,7 +70,7 @@ import java.io.ObjectStreamException;
* <p> For methods that return a textual representation as output * <p> For methods that return a textual representation as output
* value, the first form, i.e. a dotted-quad string, is used. * value, the first form, i.e. a dotted-quad string, is used.
* *
* <h4> The Scope of a Multicast Address </h4> * <h3> The Scope of a Multicast Address </h3>
* *
* Historically the IPv4 TTL field in the IP header has doubled as a * Historically the IPv4 TTL field in the IP header has doubled as a
* multicast scope field: a TTL of 0 means node-local, 1 means * multicast scope field: a TTL of 0 means node-local, 1 means

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,7 @@ import java.util.Arrays;
* Defined by <a href="http://www.ietf.org/rfc/rfc2373.txt"> * Defined by <a href="http://www.ietf.org/rfc/rfc2373.txt">
* <i>RFC&nbsp;2373: IP Version 6 Addressing Architecture</i></a>. * <i>RFC&nbsp;2373: IP Version 6 Addressing Architecture</i></a>.
* *
* <h3> <a id="format">Textual representation of IP addresses</a> </h3> * <h2> <a id="format">Textual representation of IP addresses</a> </h2>
* *
* Textual representation of IPv6 address used as input to methods * Textual representation of IPv6 address used as input to methods
* takes one of the following forms: * takes one of the following forms:
@ -116,7 +116,7 @@ import java.util.Arrays;
* form because it is unambiguous when used in combination with other * form because it is unambiguous when used in combination with other
* textual data. * textual data.
* *
* <h4> Special IPv6 address </h4> * <h3> Special IPv6 address </h3>
* *
* <blockquote> * <blockquote>
* <table class="borderless"> * <table class="borderless">
@ -135,7 +135,7 @@ import java.util.Arrays;
* address.</td></tr> * address.</td></tr>
* </table></blockquote> * </table></blockquote>
* *
* <h4><a id="scoped">Textual representation of IPv6 scoped addresses</a></h4> * <h3><a id="scoped">Textual representation of IPv6 scoped addresses</a></h3>
* *
* <p> The textual representation of IPv6 addresses as described above can be * <p> The textual representation of IPv6 addresses as described above can be
* extended to specify IPv6 scoped addresses. This extension to the basic * extended to specify IPv6 scoped addresses. This extension to the basic

View file

@ -71,7 +71,7 @@ import sun.net.util.IPAddressUtil;
* with a host name or whether it has already done reverse host name * with a host name or whether it has already done reverse host name
* resolution). * resolution).
* *
* <h3> Address types </h3> * <h2> Address types </h2>
* *
* <table class="striped" style="margin-left:2em"> * <table class="striped" style="margin-left:2em">
* <caption style="display:none">Description of unicast and multicast address types</caption> * <caption style="display:none">Description of unicast and multicast address types</caption>
@ -105,7 +105,7 @@ import sun.net.util.IPAddressUtil;
* </tbody> * </tbody>
* </table> * </table>
* *
* <h4> IP address scope </h4> * <h3> IP address scope </h3>
* *
* <p> <i>Link-local</i> addresses are designed to be used for addressing * <p> <i>Link-local</i> addresses are designed to be used for addressing
* on a single link for purposes such as auto-address configuration, * on a single link for purposes such as auto-address configuration,
@ -116,7 +116,7 @@ import sun.net.util.IPAddressUtil;
* *
* <p> <i>Global</i> addresses are unique across the internet. * <p> <i>Global</i> addresses are unique across the internet.
* *
* <h4> Textual representation of IP addresses </h4> * <h3> Textual representation of IP addresses </h3>
* *
* The textual representation of an IP address is address family specific. * The textual representation of an IP address is address family specific.
* *
@ -130,7 +130,7 @@ import sun.net.util.IPAddressUtil;
* <P>There is a <a href="doc-files/net-properties.html#Ipv4IPv6">couple of * <P>There is a <a href="doc-files/net-properties.html#Ipv4IPv6">couple of
* System Properties</a> affecting how IPv4 and IPv6 addresses are used.</P> * System Properties</a> affecting how IPv4 and IPv6 addresses are used.</P>
* *
* <h4> Host Name Resolution </h4> * <h3> Host Name Resolution </h3>
* *
* Host name-to-IP address <i>resolution</i> is accomplished through * Host name-to-IP address <i>resolution</i> is accomplished through
* the use of a combination of local machine configuration information * the use of a combination of local machine configuration information
@ -145,7 +145,7 @@ import sun.net.util.IPAddressUtil;
* <p> The InetAddress class provides methods to resolve host names to * <p> The InetAddress class provides methods to resolve host names to
* their IP addresses and vice versa. * their IP addresses and vice versa.
* *
* <h4> InetAddress Caching </h4> * <h3> InetAddress Caching </h3>
* *
* The InetAddress class has a cache to store successful as well as * The InetAddress class has a cache to store successful as well as
* unsuccessful host name resolutions. * unsuccessful host name resolutions.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -64,7 +64,7 @@ import java.lang.NullPointerException; // for javadoc
* and relativizing URI instances. Instances of this class are immutable. * and relativizing URI instances. Instances of this class are immutable.
* *
* *
* <h3> URI syntax and components </h3> * <h2> URI syntax and components </h2>
* *
* At the highest level a URI reference (hereinafter simply "URI") in string * At the highest level a URI reference (hereinafter simply "URI") in string
* form has the syntax * form has the syntax
@ -168,7 +168,7 @@ import java.lang.NullPointerException; // for javadoc
* will be defined and the user-information and port components may be defined. * will be defined and the user-information and port components may be defined.
* *
* *
* <h4> Operations on URI instances </h4> * <h3> Operations on URI instances </h3>
* *
* The key operations supported by this class are those of * The key operations supported by this class are those of
* <i>normalization</i>, <i>resolution</i>, and <i>relativization</i>. * <i>normalization</i>, <i>resolution</i>, and <i>relativization</i>.
@ -247,7 +247,7 @@ import java.lang.NullPointerException; // for javadoc
* yields the relative URI {@code sample/a/index.html#28}. * yields the relative URI {@code sample/a/index.html#28}.
* *
* *
* <h4> Character categories </h4> * <h3> Character categories </h3>
* *
* RFC&nbsp;2396 specifies precisely which characters are permitted in the * RFC&nbsp;2396 specifies precisely which characters are permitted in the
* various components of a URI reference. The following categories, most of * various components of a URI reference. The following categories, most of
@ -298,7 +298,7 @@ import java.lang.NullPointerException; // for javadoc
* characters. * characters.
* *
* *
* <h4> Escaped octets, quotation, encoding, and decoding </h4> * <h3> Escaped octets, quotation, encoding, and decoding </h3>
* *
* RFC 2396 allows escaped octets to appear in the user-info, path, query, and * RFC 2396 allows escaped octets to appear in the user-info, path, query, and
* fragment components. Escaping serves two purposes in URIs: * fragment components. Escaping serves two purposes in URIs:
@ -390,7 +390,7 @@ import java.lang.NullPointerException; // for javadoc
* </ul> * </ul>
* *
* *
* <h4> Identities </h4> * <h3> Identities </h3>
* *
* For any URI <i>u</i>, it is always the case that * For any URI <i>u</i>, it is always the case that
* *
@ -426,7 +426,7 @@ import java.lang.NullPointerException; // for javadoc
* authority. * authority.
* *
* *
* <h4> URIs, URLs, and URNs </h4> * <h3> URIs, URLs, and URNs </h3>
* *
* A URI is a uniform resource <i>identifier</i> while a URL is a uniform * A URI is a uniform resource <i>identifier</i> while a URL is a uniform
* resource <i>locator</i>. Hence every URL is a URI, abstractly speaking, but * resource <i>locator</i>. Hence every URL is a URI, abstractly speaking, but

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -151,7 +151,7 @@ import java.util.Arrays;
* }</pre> * }</pre>
* </blockquote> * </blockquote>
* *
* <h3><a id="synchronization">Synchronization</a></h3> * <h2><a id="synchronization">Synchronization</a></h2>
* *
* <p> * <p>
* Choice formats are not synchronized. * Choice formats are not synchronized.

View file

@ -73,7 +73,7 @@ import java.util.concurrent.atomic.AtomicLong;
* String result = fmt.format(1000); * String result = fmt.format(1000);
* </pre></blockquote> * </pre></blockquote>
* *
* <h3><a id="compact_number_style">Style</a></h3> * <h2><a id="compact_number_style">Style</a></h2>
* <p> * <p>
* A number can be formatted in the compact forms with two different * A number can be formatted in the compact forms with two different
* styles, {@link NumberFormat.Style#SHORT SHORT} * styles, {@link NumberFormat.Style#SHORT SHORT}
@ -88,7 +88,7 @@ import java.util.concurrent.atomic.AtomicLong;
* {@link NumberFormat.Style#LONG LONG} style instance in same locale * {@link NumberFormat.Style#LONG LONG} style instance in same locale
* formats {@code 10000} as {@code "10 thousand"}. * formats {@code 10000} as {@code "10 thousand"}.
* *
* <h3><a id="compact_number_patterns">Compact Number Patterns</a></h3> * <h2><a id="compact_number_patterns">Compact Number Patterns</a></h2>
* <p> * <p>
* The compact number patterns are represented in a series of patterns where each * The compact number patterns are represented in a series of patterns where each
* pattern is used to format a range of numbers. An example of * pattern is used to format a range of numbers. An example of
@ -151,7 +151,7 @@ import java.util.concurrent.atomic.AtomicLong;
* unless noted otherwise, if they are to appear in the prefix or suffix * unless noted otherwise, if they are to appear in the prefix or suffix
* as literals. For example, 0\u0915'.'. * as literals. For example, 0\u0915'.'.
* *
* <h3>Formatting</h3> * <h2>Formatting</h2>
* The default formatting behavior returns a formatted string with no fractional * The default formatting behavior returns a formatted string with no fractional
* digits, however users can use the {@link #setMinimumFractionDigits(int)} * digits, however users can use the {@link #setMinimumFractionDigits(int)}
* method to include the fractional part. * method to include the fractional part.
@ -165,14 +165,14 @@ import java.util.concurrent.atomic.AtomicLong;
* {@link java.text.DecimalFormat DecimalFormat} * {@link java.text.DecimalFormat DecimalFormat}
* for the specified locale is used. * for the specified locale is used.
* *
* <h3>Parsing</h3> * <h2>Parsing</h2>
* The default parsing behavior does not allow a grouping separator until * The default parsing behavior does not allow a grouping separator until
* grouping used is set to {@code true} by using * grouping used is set to {@code true} by using
* {@link #setGroupingUsed(boolean)}. The parsing of the fractional part * {@link #setGroupingUsed(boolean)}. The parsing of the fractional part
* depends on the {@link #isParseIntegerOnly()}. For example, if the * depends on the {@link #isParseIntegerOnly()}. For example, if the
* parse integer only is set to true, then the fractional part is skipped. * parse integer only is set to true, then the fractional part is skipped.
* *
* <h3>Rounding</h3> * <h2>Rounding</h2>
* {@code CompactNumberFormat} provides rounding modes defined in * {@code CompactNumberFormat} provides rounding modes defined in
* {@link java.math.RoundingMode} for formatting. By default, it uses * {@link java.math.RoundingMode} for formatting. By default, it uses
* {@link java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN}. * {@link java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN}.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -140,7 +140,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* on the screen. * on the screen.
* </ul> * </ul>
* *
* <h3><a id="synchronization">Synchronization</a></h3> * <h2><a id="synchronization">Synchronization</a></h2>
* *
* <p> * <p>
* Date formats are not synchronized. * Date formats are not synchronized.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -84,7 +84,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* the <code>NumberFormat</code> factory methods, the pattern and symbols are * the <code>NumberFormat</code> factory methods, the pattern and symbols are
* read from localized <code>ResourceBundle</code>s. * read from localized <code>ResourceBundle</code>s.
* *
* <h3>Patterns</h3> * <h2>Patterns</h2>
* *
* <code>DecimalFormat</code> patterns have the following syntax: * <code>DecimalFormat</code> patterns have the following syntax:
* <blockquote><pre> * <blockquote><pre>
@ -154,7 +154,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* used. So <code>"#,##,###,####"</code> == <code>"######,####"</code> == * used. So <code>"#,##,###,####"</code> == <code>"######,####"</code> ==
* <code>"##,####,####"</code>. * <code>"##,####,####"</code>.
* *
* <h4><a id="special_pattern_character">Special Pattern Characters</a></h4> * <h3><a id="special_pattern_character">Special Pattern Characters</a></h3>
* *
* <p>Many characters in a pattern are taken literally; they are matched during * <p>Many characters in a pattern are taken literally; they are matched during
* parsing and output unchanged during formatting. Special characters, on the * parsing and output unchanged during formatting. Special characters, on the
@ -245,7 +245,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* </table> * </table>
* </blockquote> * </blockquote>
* *
* <h4>Scientific Notation</h4> * <h3>Scientific Notation</h3>
* *
* <p>Numbers in scientific notation are expressed as the product of a mantissa * <p>Numbers in scientific notation are expressed as the product of a mantissa
* and a power of ten, for example, 1234 can be expressed as 1.234 x 10^3. The * and a power of ten, for example, 1234 can be expressed as 1.234 x 10^3. The
@ -292,13 +292,13 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* <li>Exponential patterns may not contain grouping separators. * <li>Exponential patterns may not contain grouping separators.
* </ul> * </ul>
* *
* <h4>Rounding</h4> * <h3>Rounding</h3>
* *
* <code>DecimalFormat</code> provides rounding modes defined in * <code>DecimalFormat</code> provides rounding modes defined in
* {@link java.math.RoundingMode} for formatting. By default, it uses * {@link java.math.RoundingMode} for formatting. By default, it uses
* {@link java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN}. * {@link java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN}.
* *
* <h4>Digits</h4> * <h3>Digits</h3>
* *
* For formatting, <code>DecimalFormat</code> uses the ten consecutive * For formatting, <code>DecimalFormat</code> uses the ten consecutive
* characters starting with the localized zero digit defined in the * characters starting with the localized zero digit defined in the
@ -328,7 +328,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* and <code>isParseIntegerOnly()</code> are false. * and <code>isParseIntegerOnly()</code> are false.
* </ul> * </ul>
* *
* <h4><a id="synchronization">Synchronization</a></h4> * <h3><a id="synchronization">Synchronization</a></h3>
* *
* <p> * <p>
* Decimal formats are generally not synchronized. * Decimal formats are generally not synchronized.
@ -336,7 +336,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* If multiple threads access a format concurrently, it must be synchronized * If multiple threads access a format concurrently, it must be synchronized
* externally. * externally.
* *
* <h4>Example</h4> * <h3>Example</h3>
* *
* <blockquote><pre>{@code * <blockquote><pre>{@code
* <strong>// Print out a number using the localized number, integer, currency, * <strong>// Print out a number using the localized number, integer, currency,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -58,7 +58,7 @@ import java.io.Serializable;
* no separator in between, and in this case the <code>parseObject</code> could * no separator in between, and in this case the <code>parseObject</code> could
* not tell which digits belong to which number. * not tell which digits belong to which number.
* *
* <h3>Subclassing</h3> * <h2>Subclassing</h2>
* *
* <p> * <p>
* The Java Platform provides three specialized subclasses of <code>Format</code>-- * The Java Platform provides three specialized subclasses of <code>Format</code>--
@ -115,7 +115,7 @@ import java.io.Serializable;
* the field. For examples of these constants, see <code>ERA_FIELD</code> and its * the field. For examples of these constants, see <code>ERA_FIELD</code> and its
* friends in {@link DateFormat}. * friends in {@link DateFormat}.
* *
* <h4><a id="synchronization">Synchronization</a></h4> * <h3><a id="synchronization">Synchronization</a></h3>
* *
* <p> * <p>
* Formats are generally not synchronized. * Formats are generally not synchronized.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -68,7 +68,7 @@ import java.util.Locale;
* behavior is defined by the pattern that you provide as well as the * behavior is defined by the pattern that you provide as well as the
* subformats used for inserted arguments. * subformats used for inserted arguments.
* *
* <h3><a id="patterns">Patterns and Their Interpretation</a></h3> * <h2><a id="patterns">Patterns and Their Interpretation</a></h2>
* *
* <code>MessageFormat</code> uses patterns of the following form: * <code>MessageFormat</code> uses patterns of the following form:
* <blockquote><pre> * <blockquote><pre>
@ -220,7 +220,7 @@ import java.util.Locale;
* </tbody> * </tbody>
* </table> * </table>
* *
* <h4>Usage Information</h4> * <h3>Usage Information</h3>
* *
* <p> * <p>
* Here are some examples of usage. * Here are some examples of usage.
@ -326,7 +326,7 @@ import java.util.Locale;
* // result now equals {new String("z")} * // result now equals {new String("z")}
* </pre></blockquote> * </pre></blockquote>
* *
* <h4><a id="synchronization">Synchronization</a></h4> * <h3><a id="synchronization">Synchronization</a></h3>
* *
* <p> * <p>
* Message formats are not synchronized. * Message formats are not synchronized.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -175,7 +175,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* numbers: "(12)" for -12. * numbers: "(12)" for -12.
* </ol> * </ol>
* *
* <h3><a id="synchronization">Synchronization</a></h3> * <h2><a id="synchronization">Synchronization</a></h2>
* *
* <p> * <p>
* Number formats are generally not synchronized. * Number formats are generally not synchronized.

View file

@ -74,7 +74,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* For more information on using these methods, see * For more information on using these methods, see
* {@link DateFormat}. * {@link DateFormat}.
* *
* <h3>Date and Time Patterns</h3> * <h2>Date and Time Patterns</h2>
* <p> * <p>
* Date and time formats are specified by <em>date and time pattern</em> * Date and time formats are specified by <em>date and time pattern</em>
* strings. * strings.
@ -370,7 +370,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* <code>SimpleDateFormat</code> does not deal with the localization of text * <code>SimpleDateFormat</code> does not deal with the localization of text
* other than the pattern letters; that's up to the client of the class. * other than the pattern letters; that's up to the client of the class.
* *
* <h4>Examples</h4> * <h3>Examples</h3>
* *
* The following examples show how date and time patterns are interpreted in * The following examples show how date and time patterns are interpreted in
* the U.S. locale. The given date and time are 2001-07-04 12:08:56 local time * the U.S. locale. The given date and time are 2001-07-04 12:08:56 local time
@ -421,7 +421,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* </table> * </table>
* </blockquote> * </blockquote>
* *
* <h4><a id="synchronization">Synchronization</a></h4> * <h3><a id="synchronization">Synchronization</a></h3>
* *
* <p> * <p>
* Date formats are not synchronized. * Date formats are not synchronized.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -108,7 +108,7 @@ import java.util.Objects;
* For both the epoch-second and nanosecond parts, a larger value is always later on the time-line * For both the epoch-second and nanosecond parts, a larger value is always later on the time-line
* than a smaller value. * than a smaller value.
* *
* <h3>Time-scale</h3> * <h2>Time-scale</h2>
* <p> * <p>
* The length of the solar day is the standard way that humans measure time. * The length of the solar day is the standard way that humans measure time.
* This has traditionally been subdivided into 24 hours of 60 minutes of 60 seconds, * This has traditionally been subdivided into 24 hours of 60 minutes of 60 seconds,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -111,7 +111,7 @@ import static java.util.Map.entry;
* Similarly, a comparison of two IDs only examines the ID, whereas * Similarly, a comparison of two IDs only examines the ID, whereas
* a comparison of two rules examines the entire data set. * a comparison of two rules examines the entire data set.
* *
* <h3>Time-zone IDs</h3> * <h2>Time-zone IDs</h2>
* The ID is unique within the system. * The ID is unique within the system.
* There are three types of ID. * There are three types of ID.
* <p> * <p>
@ -147,7 +147,7 @@ import static java.util.Map.entry;
* The recommended format for region IDs from groups other than TZDB is 'group~region'. * The recommended format for region IDs from groups other than TZDB is 'group~region'.
* Thus if IATA data were defined, Utrecht airport would be 'IATA~UTC'. * Thus if IATA data were defined, Utrecht airport would be 'IATA~UTC'.
* *
* <h3>Serialization</h3> * <h2>Serialization</h2>
* This class can be serialized and stores the string zone ID in the external form. * This class can be serialized and stores the string zone ID in the external form.
* The {@code ZoneOffset} subclass uses a dedicated format that only stores the * The {@code ZoneOffset} subclass uses a dedicated format that only stores the
* offset from UTC/Greenwich. * offset from UTC/Greenwich.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -99,7 +99,7 @@ import java.util.Objects;
* The chronology defines how the calendar system operates and the meaning of * The chronology defines how the calendar system operates and the meaning of
* the standard fields. * the standard fields.
* *
* <h3>When to use this interface</h3> * <h2>When to use this interface</h2>
* The design of the API encourages the use of {@code LocalDate} rather than this * The design of the API encourages the use of {@code LocalDate} rather than this
* interface, even in the case where the application needs to deal with multiple * interface, even in the case where the application needs to deal with multiple
* calendar systems. * calendar systems.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -121,7 +121,7 @@ import java.util.Objects;
* first, last); * first, last);
* </pre> * </pre>
* *
* <h3>Adding Calendars</h3> * <h2>Adding Calendars</h2>
* <p> The set of calendars is extensible by defining a subclass of {@link ChronoLocalDate} * <p> The set of calendars is extensible by defining a subclass of {@link ChronoLocalDate}
* to represent a date instance and an implementation of {@code Chronology} * to represent a date instance and an implementation of {@code Chronology}
* to be the factory for the ChronoLocalDate subclass. * to be the factory for the ChronoLocalDate subclass.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -102,7 +102,7 @@ import java.util.Objects;
* The chronology defines how the calendar system operates and the meaning of * The chronology defines how the calendar system operates and the meaning of
* the standard fields. * the standard fields.
* *
* <h3>When to use this interface</h3> * <h2>When to use this interface</h2>
* The design of the API encourages the use of {@code LocalDateTime} rather than this * The design of the API encourages the use of {@code LocalDateTime} rather than this
* interface, even in the case where the application needs to deal with multiple * interface, even in the case where the application needs to deal with multiple
* calendar systems. The rationale for this is explored in detail in {@link ChronoLocalDate}. * calendar systems. The rationale for this is explored in detail in {@link ChronoLocalDate}.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -103,7 +103,7 @@ import java.util.Objects;
* The chronology defines how the calendar system operates and the meaning of * The chronology defines how the calendar system operates and the meaning of
* the standard fields. * the standard fields.
* *
* <h3>When to use this interface</h3> * <h2>When to use this interface</h2>
* The design of the API encourages the use of {@code ZonedDateTime} rather than this * The design of the API encourages the use of {@code ZonedDateTime} rather than this
* interface, even in the case where the application needs to deal with multiple * interface, even in the case where the application needs to deal with multiple
* calendar systems. The rationale for this is explored in detail in {@link ChronoLocalDate}. * calendar systems. The rationale for this is explored in detail in {@link ChronoLocalDate}.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -133,7 +133,7 @@ import java.util.Set;
* <li> {@link #date(TemporalAccessor) date(TemporalAccessor)} * <li> {@link #date(TemporalAccessor) date(TemporalAccessor)}
* </ul> * </ul>
* *
* <h3 id="addcalendars">Adding New Calendars</h3> * <h2 id="addcalendars">Adding New Calendars</h2>
* The set of available chronologies can be extended by applications. * The set of available chronologies can be extended by applications.
* Adding a new calendar system requires the writing of an implementation of * Adding a new calendar system requires the writing of an implementation of
* {@code Chronology}, {@code ChronoLocalDate} and {@code Era}. * {@code Chronology}, {@code ChronoLocalDate} and {@code Era}.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -150,7 +150,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* class for formatting. The {@link #toFormat()} method returns an * class for formatting. The {@link #toFormat()} method returns an
* implementation of {@code java.text.Format}. * implementation of {@code java.text.Format}.
* *
* <h3 id="predefined">Predefined Formatters</h3> * <h2 id="predefined">Predefined Formatters</h2>
* <table class="striped" style="text-align:left"> * <table class="striped" style="text-align:left">
* <caption>Predefined Formatters</caption> * <caption>Predefined Formatters</caption>
* <thead> * <thead>
@ -258,7 +258,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* </tbody> * </tbody>
* </table> * </table>
* *
* <h3 id="patterns">Patterns for Formatting and Parsing</h3> * <h2 id="patterns">Patterns for Formatting and Parsing</h2>
* Patterns are based on a simple sequence of letters and symbols. * Patterns are based on a simple sequence of letters and symbols.
* A pattern is used to create a Formatter using the * A pattern is used to create a Formatter using the
* {@link #ofPattern(String)} and {@link #ofPattern(String, Locale)} methods. * {@link #ofPattern(String)} and {@link #ofPattern(String, Locale)} methods.
@ -434,7 +434,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* that you want to output directly to ensure that future changes do not break * that you want to output directly to ensure that future changes do not break
* your application. * your application.
* *
* <h3 id="resolving">Resolving</h3> * <h2 id="resolving">Resolving</h2>
* Parsing is implemented as a two-phase operation. * Parsing is implemented as a two-phase operation.
* First, the text is parsed using the layout defined by the formatter, producing * First, the text is parsed using the layout defined by the formatter, producing
* a {@code Map} of field to value, a {@code ZoneId} and a {@code Chronology}. * a {@code Map} of field to value, a {@code ZoneId} and a {@code Chronology}.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -91,7 +91,7 @@ import sun.util.locale.provider.LocaleResources;
* <p> * <p>
* This class defines fields and units that are specific to the ISO calendar system. * This class defines fields and units that are specific to the ISO calendar system.
* *
* <h3>Quarter of year</h3> * <h2>Quarter of year</h2>
* The ISO-8601 standard is based on the standard civic 12 month year. * The ISO-8601 standard is based on the standard civic 12 month year.
* This is commonly divided into four quarters, often abbreviated as Q1, Q2, Q3 and Q4. * This is commonly divided into four quarters, often abbreviated as Q1, Q2, Q3 and Q4.
* <p> * <p>
@ -107,7 +107,7 @@ import sun.util.locale.provider.LocaleResources;
* <li>{@link ChronoField#YEAR YEAR} - the standard ISO year * <li>{@link ChronoField#YEAR YEAR} - the standard ISO year
* </ul> * </ul>
* *
* <h3>Week based years</h3> * <h2>Week based years</h2>
* The ISO-8601 standard was originally intended as a data interchange format, * The ISO-8601 standard was originally intended as a data interchange format,
* defining a string format for dates and times. However, it also defines an * defining a string format for dates and times. However, it also defines an
* alternate way of expressing the date, based on the concept of week-based-year. * alternate way of expressing the date, based on the concept of week-based-year.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -115,7 +115,7 @@ public final class JulianFields {
* the Julian Day value is validated against the range of valid values. * the Julian Day value is validated against the range of valid values.
* In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs. * In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs.
* *
* <h3>Astronomical and Scientific Notes</h3> * <h4>Astronomical and Scientific Notes</h4>
* The standard astronomical definition uses a fraction to indicate the time-of-day, * The standard astronomical definition uses a fraction to indicate the time-of-day,
* where each day is counted from midday to midday. For example, * where each day is counted from midday to midday. For example,
* a fraction of 0 represents midday, a fraction of 0.25 * a fraction of 0 represents midday, a fraction of 0.25
@ -169,7 +169,7 @@ public final class JulianFields {
* the Modified Julian Day value is validated against the range of valid values. * the Modified Julian Day value is validated against the range of valid values.
* In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs. * In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs.
* *
* <h3>Astronomical and Scientific Notes</h3> * <h4>Astronomical and Scientific Notes</h4>
* <pre> * <pre>
* | ISO date | Modified Julian Day | Decimal MJD | * | ISO date | Modified Julian Day | Decimal MJD |
* | 1970-01-01T00:00 | 40,587 | 40,587.0 | * | 1970-01-01T00:00 | 40,587 | 40,587.0 |

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -92,7 +92,7 @@ import java.time.DateTimeException;
* of this interface may be in calendar systems other than ISO. * of this interface may be in calendar systems other than ISO.
* See {@link java.time.chrono.ChronoLocalDate} for a fuller discussion of the issues. * See {@link java.time.chrono.ChronoLocalDate} for a fuller discussion of the issues.
* *
* <h3>When to implement</h3> * <h2>When to implement</h2>
* <p> * <p>
* A class should implement this interface if it meets three criteria: * A class should implement this interface if it meets three criteria:
* <ul> * <ul>

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -120,7 +120,7 @@ import sun.util.locale.provider.LocaleResources;
* </ul> * </ul>
* Together these two values allow a year or month to be divided into weeks. * Together these two values allow a year or month to be divided into weeks.
* *
* <h3>Week of Month</h3> * <h2>Week of Month</h2>
* One field is used: week-of-month. * One field is used: week-of-month.
* The calculation ensures that weeks never overlap a month boundary. * The calculation ensures that weeks never overlap a month boundary.
* The month is divided into periods where each period starts on the defined first day-of-week. * The month is divided into periods where each period starts on the defined first day-of-week.
@ -145,14 +145,14 @@ import sun.util.locale.provider.LocaleResources;
* </tbody> * </tbody>
* </table> * </table>
* *
* <h3>Week of Year</h3> * <h2>Week of Year</h2>
* One field is used: week-of-year. * One field is used: week-of-year.
* The calculation ensures that weeks never overlap a year boundary. * The calculation ensures that weeks never overlap a year boundary.
* The year is divided into periods where each period starts on the defined first day-of-week. * The year is divided into periods where each period starts on the defined first day-of-week.
* The earliest period is referred to as week 0 if it has less than the minimal number of days * The earliest period is referred to as week 0 if it has less than the minimal number of days
* and week 1 if it has at least the minimal number of days. * and week 1 if it has at least the minimal number of days.
* *
* <h3>Week Based Year</h3> * <h2>Week Based Year</h2>
* Two fields are used for week-based-year, one for the * Two fields are used for week-based-year, one for the
* {@link #weekOfWeekBasedYear() week-of-week-based-year} and one for * {@link #weekOfWeekBasedYear() week-of-week-based-year} and one for
* {@link #weekBasedYear() week-based-year}. In a week-based-year, each week * {@link #weekBasedYear() week-based-year}. In a week-based-year, each week

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -97,7 +97,7 @@ import sun.util.spi.CalendarProvider;
* concrete subclass, such as <code>ERA</code>. See individual field * concrete subclass, such as <code>ERA</code>. See individual field
* documentation and subclass documentation for details. * documentation and subclass documentation for details.
* *
* <h3>Getting and Setting Calendar Field Values</h3> * <h2>Getting and Setting Calendar Field Values</h2>
* *
* <p>The calendar field values can be set by calling the <code>set</code> * <p>The calendar field values can be set by calling the <code>set</code>
* methods. Any field values set in a <code>Calendar</code> will not be * methods. Any field values set in a <code>Calendar</code> will not be
@ -106,7 +106,7 @@ import sun.util.spi.CalendarProvider;
* <code>get</code>, <code>getTimeInMillis</code>, <code>getTime</code>, * <code>get</code>, <code>getTimeInMillis</code>, <code>getTime</code>,
* <code>add</code> and <code>roll</code> involves such calculation. * <code>add</code> and <code>roll</code> involves such calculation.
* *
* <h4>Leniency</h4> * <h3>Leniency</h3>
* *
* <p><code>Calendar</code> has two modes for interpreting the calendar * <p><code>Calendar</code> has two modes for interpreting the calendar
* fields, <em>lenient</em> and <em>non-lenient</em>. When a * fields, <em>lenient</em> and <em>non-lenient</em>. When a
@ -125,7 +125,7 @@ import sun.util.spi.CalendarProvider;
* calculating its time or calendar field values if any out-of-range field * calculating its time or calendar field values if any out-of-range field
* value has been set. * value has been set.
* *
* <h4><a id="first_week">First Week</a></h4> * <h3><a id="first_week">First Week</a></h3>
* *
* <code>Calendar</code> defines a locale-specific seven day week using two * <code>Calendar</code> defines a locale-specific seven day week using two
* parameters: the first day of the week and the minimal days in first week * parameters: the first day of the week and the minimal days in first week
@ -150,7 +150,7 @@ import sun.util.spi.CalendarProvider;
* designate the week before week 1 of a year as week <code><i>n</i></code> of * designate the week before week 1 of a year as week <code><i>n</i></code> of
* the previous year. * the previous year.
* *
* <h4>Calendar Fields Resolution</h4> * <h3>Calendar Fields Resolution</h3>
* *
* When computing a date and time from the calendar fields, there * When computing a date and time from the calendar fields, there
* may be insufficient information for the computation (such as only * may be insufficient information for the computation (such as only
@ -210,7 +210,7 @@ import sun.util.spi.CalendarProvider;
* runtime. Use {@link DateFormat} * runtime. Use {@link DateFormat}
* to format dates. * to format dates.
* *
* <h4>Field Manipulation</h4> * <h3>Field Manipulation</h3>
* *
* The calendar fields can be changed using three methods: * The calendar fields can be changed using three methods:
* <code>set()</code>, <code>add()</code>, and <code>roll()</code>. * <code>set()</code>, <code>add()</code>, and <code>roll()</code>.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -140,7 +140,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* // -&gt; s == "Duke's Birthday: May 23, 1995" * // -&gt; s == "Duke's Birthday: May 23, 1995"
* </pre></blockquote> * </pre></blockquote>
* *
* <h3><a id="org">Organization</a></h3> * <h2><a id="org">Organization</a></h2>
* *
* <p> This specification is divided into two sections. The first section, <a * <p> This specification is divided into two sections. The first section, <a
* href="#summary">Summary</a>, covers the basic formatting concepts. This * href="#summary">Summary</a>, covers the basic formatting concepts. This
@ -150,13 +150,13 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* details. It is intended for users who want more precise specification of * details. It is intended for users who want more precise specification of
* formatting behavior. * formatting behavior.
* *
* <h3><a id="summary">Summary</a></h3> * <h2><a id="summary">Summary</a></h2>
* *
* <p> This section is intended to provide a brief overview of formatting * <p> This section is intended to provide a brief overview of formatting
* concepts. For precise behavioral details, refer to the <a * concepts. For precise behavioral details, refer to the <a
* href="#detail">Details</a> section. * href="#detail">Details</a> section.
* *
* <h4><a id="syntax">Format String Syntax</a></h4> * <h3><a id="syntax">Format String Syntax</a></h3>
* *
* <p> Every method which produces formatted output requires a <i>format * <p> Every method which produces formatted output requires a <i>format
* string</i> and an <i>argument list</i>. The format string is a {@link * string</i> and an <i>argument list</i>. The format string is a {@link
@ -236,7 +236,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* *
* </ul> * </ul>
* *
* <h4> Conversions </h4> * <h3> Conversions </h3>
* *
* <p> Conversions are divided into the following categories: * <p> Conversions are divided into the following categories:
* *
@ -376,7 +376,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* <p> Any characters not explicitly defined as conversions are illegal and are * <p> Any characters not explicitly defined as conversions are illegal and are
* reserved for future extensions. * reserved for future extensions.
* *
* <h4><a id="dt">Date/Time Conversions</a></h4> * <h3><a id="dt">Date/Time Conversions</a></h3>
* *
* <p> The following date and time conversion suffix characters are defined for * <p> The following date and time conversion suffix characters are defined for
* the {@code 't'} and {@code 'T'} conversions. The types are similar to but * the {@code 't'} and {@code 'T'} conversions. The types are similar to but
@ -550,7 +550,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* <p> Any characters not explicitly defined as date/time conversion suffixes * <p> Any characters not explicitly defined as date/time conversion suffixes
* are illegal and are reserved for future extensions. * are illegal and are reserved for future extensions.
* *
* <h4> Flags </h4> * <h3> Flags </h3>
* *
* <p> The following table summarizes the supported flags. <i>y</i> means the * <p> The following table summarizes the supported flags. <i>y</i> means the
* flag is supported for the indicated argument types. * flag is supported for the indicated argument types.
@ -636,13 +636,13 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* <p> Any characters not explicitly defined as flags are illegal and are * <p> Any characters not explicitly defined as flags are illegal and are
* reserved for future extensions. * reserved for future extensions.
* *
* <h4> Width </h4> * <h3> Width </h3>
* *
* <p> The width is the minimum number of characters to be written to the * <p> The width is the minimum number of characters to be written to the
* output. For the line separator conversion, width is not applicable; if it * output. For the line separator conversion, width is not applicable; if it
* is provided, an exception will be thrown. * is provided, an exception will be thrown.
* *
* <h4> Precision </h4> * <h3> Precision </h3>
* *
* <p> For general argument types, the precision is the maximum number of * <p> For general argument types, the precision is the maximum number of
* characters to be written to the output. * characters to be written to the output.
@ -657,7 +657,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* and line separator conversions, the precision is not applicable; if a * and line separator conversions, the precision is not applicable; if a
* precision is provided, an exception will be thrown. * precision is provided, an exception will be thrown.
* *
* <h4> Argument Index </h4> * <h3> Argument Index </h3>
* *
* <p> The argument index is a decimal integer indicating the position of the * <p> The argument index is a decimal integer indicating the position of the
* argument in the argument list. The first argument is referenced by * argument in the argument list. The first argument is referenced by
@ -676,7 +676,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* </pre></blockquote> * </pre></blockquote>
* *
* <hr> * <hr>
* <h3><a id="detail">Details</a></h3> * <h2><a id="detail">Details</a></h2>
* *
* <p> This section is intended to provide behavioral details for formatting, * <p> This section is intended to provide behavioral details for formatting,
* including conditions and exceptions, supported data types, localization, and * including conditions and exceptions, supported data types, localization, and
@ -717,7 +717,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* invocation, then the {@link java.util.Locale.Category#FORMAT default locale} * invocation, then the {@link java.util.Locale.Category#FORMAT default locale}
* is used. * is used.
* *
* <h4><a id="dgen">General</a></h4> * <h3><a id="dgen">General</a></h3>
* *
* <p> The following general conversions may be applied to any argument type: * <p> The following general conversions may be applied to any argument type:
* *
@ -814,7 +814,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* the precision. If the precision is not specified then there is no explicit * the precision. If the precision is not specified then there is no explicit
* limit on the number of characters. * limit on the number of characters.
* *
* <h4><a id="dchar">Character</a></h4> * <h3><a id="dchar">Character</a></h3>
* *
* This conversion may be applied to {@code char} and {@link Character}. It * This conversion may be applied to {@code char} and {@link Character}. It
* may also be applied to the types {@code byte}, {@link Byte}, * may also be applied to the types {@code byte}, {@link Byte},
@ -853,7 +853,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* <p> The precision is not applicable. If the precision is specified then an * <p> The precision is not applicable. If the precision is specified then an
* {@link IllegalFormatPrecisionException} will be thrown. * {@link IllegalFormatPrecisionException} will be thrown.
* *
* <h4><a id="dnum">Numeric</a></h4> * <h3><a id="dnum">Numeric</a></h3>
* *
* <p> Numeric conversions are divided into the following categories: * <p> Numeric conversions are divided into the following categories:
* *
@ -1547,7 +1547,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* href="#floatDPrec">precision</a> is the same as defined for Float and * href="#floatDPrec">precision</a> is the same as defined for Float and
* Double. * Double.
* *
* <h4><a id="ddt">Date/Time</a></h4> * <h3><a id="ddt">Date/Time</a></h3>
* *
* <p> This conversion may be applied to {@code long}, {@link Long}, {@link * <p> This conversion may be applied to {@code long}, {@link Long}, {@link
* Calendar}, {@link Date} and {@link TemporalAccessor TemporalAccessor} * Calendar}, {@link Date} and {@link TemporalAccessor TemporalAccessor}
@ -1796,7 +1796,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* <p> The precision is not applicable. If the precision is specified then an * <p> The precision is not applicable. If the precision is specified then an
* {@link IllegalFormatPrecisionException} will be thrown. * {@link IllegalFormatPrecisionException} will be thrown.
* *
* <h4><a id="dper">Percent</a></h4> * <h3><a id="dper">Percent</a></h3>
* *
* <p> The conversion does not correspond to any argument. * <p> The conversion does not correspond to any argument.
* *
@ -1824,7 +1824,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* </tbody> * </tbody>
* </table> * </table>
* *
* <h4><a id="dls">Line Separator</a></h4> * <h3><a id="dls">Line Separator</a></h3>
* *
* <p> The conversion does not correspond to any argument. * <p> The conversion does not correspond to any argument.
* *
@ -1843,7 +1843,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* {@link IllegalFormatFlagsException}, {@link IllegalFormatWidthException}, * {@link IllegalFormatFlagsException}, {@link IllegalFormatWidthException},
* and {@link IllegalFormatPrecisionException}, respectively will be thrown. * and {@link IllegalFormatPrecisionException}, respectively will be thrown.
* *
* <h4><a id="dpos">Argument Index</a></h4> * <h3><a id="dpos">Argument Index</a></h3>
* *
* <p> Format specifiers can reference arguments in three ways: * <p> Format specifiers can reference arguments in three ways:
* *

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -91,7 +91,7 @@ import sun.util.calendar.ZoneInfo;
* adjustment may be made if desired for dates that are prior to the Gregorian * adjustment may be made if desired for dates that are prior to the Gregorian
* changeover and which fall between January 1 and March 24. * changeover and which fall between January 1 and March 24.
* *
* <h3><a id="week_and_year">Week Of Year and Week Year</a></h3> * <h2><a id="week_and_year">Week Of Year and Week Year</a></h2>
* *
* <p>Values calculated for the {@link Calendar#WEEK_OF_YEAR * <p>Values calculated for the {@link Calendar#WEEK_OF_YEAR
* WEEK_OF_YEAR} field range from 1 to 53. The first week of a * WEEK_OF_YEAR} field range from 1 to 53. The first week of a
@ -133,7 +133,7 @@ import sun.util.calendar.ZoneInfo;
* ends on January 10, 1998; the first three days of 1998 then are * ends on January 10, 1998; the first three days of 1998 then are
* part of week 53 of 1997 and their week year is 1997. * part of week 53 of 1997 and their week year is 1997.
* *
* <h4>Week Of Month</h4> * <h3>Week Of Month</h3>
* *
* <p>Values calculated for the <code>WEEK_OF_MONTH</code> field range from 0 * <p>Values calculated for the <code>WEEK_OF_MONTH</code> field range from 0
* to 6. Week 1 of a month (the days with <code>WEEK_OF_MONTH = * to 6. Week 1 of a month (the days with <code>WEEK_OF_MONTH =
@ -153,7 +153,7 @@ import sun.util.calendar.ZoneInfo;
* <code>getMinimalDaysInFirstWeek()</code> is changed to 3, then January 1 * <code>getMinimalDaysInFirstWeek()</code> is changed to 3, then January 1
* through January 3 have a <code>WEEK_OF_MONTH</code> of 1. * through January 3 have a <code>WEEK_OF_MONTH</code> of 1.
* *
* <h4>Default Fields Values</h4> * <h3>Default Fields Values</h3>
* *
* <p>The <code>clear</code> method sets calendar field(s) * <p>The <code>clear</code> method sets calendar field(s)
* undefined. <code>GregorianCalendar</code> uses the following * undefined. <code>GregorianCalendar</code> uses the following

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -190,7 +190,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* requirement (is well-formed), but does not validate the value * requirement (is well-formed), but does not validate the value
* itself. See {@link Builder} for details. * itself. See {@link Builder} for details.
* *
* <h3><a id="def_locale_extension">Unicode locale/language extension</a></h3> * <h2><a id="def_locale_extension">Unicode locale/language extension</a></h2>
* *
* <p>UTS#35, "Unicode Locale Data Markup Language" defines optional * <p>UTS#35, "Unicode Locale Data Markup Language" defines optional
* attributes and keywords to override or refine the default behavior * attributes and keywords to override or refine the default behavior
@ -230,17 +230,17 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* implementations in a Java Runtime Environment might not support any * implementations in a Java Runtime Environment might not support any
* particular Unicode locale attributes or key/type pairs. * particular Unicode locale attributes or key/type pairs.
* *
* <h4>Creating a Locale</h4> * <h3>Creating a Locale</h3>
* *
* <p>There are several different ways to create a <code>Locale</code> * <p>There are several different ways to create a <code>Locale</code>
* object. * object.
* *
* <h5>Builder</h5> * <h4>Builder</h4>
* *
* <p>Using {@link Builder} you can construct a <code>Locale</code> object * <p>Using {@link Builder} you can construct a <code>Locale</code> object
* that conforms to BCP 47 syntax. * that conforms to BCP 47 syntax.
* *
* <h5>Constructors</h5> * <h4>Constructors</h4>
* *
* <p>The <code>Locale</code> class provides three constructors: * <p>The <code>Locale</code> class provides three constructors:
* <blockquote> * <blockquote>
@ -254,12 +254,12 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* with language, country and variant, but you cannot specify * with language, country and variant, but you cannot specify
* script or extensions. * script or extensions.
* *
* <h5>Factory Methods</h5> * <h4>Factory Methods</h4>
* *
* <p>The method {@link #forLanguageTag} creates a <code>Locale</code> * <p>The method {@link #forLanguageTag} creates a <code>Locale</code>
* object for a well-formed BCP 47 language tag. * object for a well-formed BCP 47 language tag.
* *
* <h5>Locale Constants</h5> * <h4>Locale Constants</h4>
* *
* <p>The <code>Locale</code> class provides a number of convenient constants * <p>The <code>Locale</code> class provides a number of convenient constants
* that you can use to create <code>Locale</code> objects for commonly used * that you can use to create <code>Locale</code> objects for commonly used
@ -271,7 +271,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* </pre> * </pre>
* </blockquote> * </blockquote>
* *
* <h4><a id="LocaleMatching">Locale Matching</a></h4> * <h3><a id="LocaleMatching">Locale Matching</a></h3>
* *
* <p>If an application or a system is internationalized and provides localized * <p>If an application or a system is internationalized and provides localized
* resources for multiple locales, it sometimes needs to find one or more * resources for multiple locales, it sometimes needs to find one or more
@ -292,7 +292,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* language ranges: basic and extended. See * language ranges: basic and extended. See
* {@link Locale.LanguageRange Locale.LanguageRange} for details. * {@link Locale.LanguageRange Locale.LanguageRange} for details.
* *
* <h5>Filtering</h5> * <h4>Filtering</h4>
* *
* <p>The filtering operation returns all matching language tags. It is defined * <p>The filtering operation returns all matching language tags. It is defined
* in RFC 4647 as follows: * in RFC 4647 as follows:
@ -310,7 +310,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* {@link Locale.FilteringMode} is a parameter to specify how filtering should * {@link Locale.FilteringMode} is a parameter to specify how filtering should
* be done. * be done.
* *
* <h5>Lookup</h5> * <h4>Lookup</h4>
* *
* <p>The lookup operation returns the best matching language tags. It is * <p>The lookup operation returns the best matching language tags. It is
* defined in RFC 4647 as follows: * defined in RFC 4647 as follows:
@ -342,7 +342,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* an {@link Iterator} over a {@link Collection} of language tags is treated as * an {@link Iterator} over a {@link Collection} of language tags is treated as
* the best matching one. * the best matching one.
* *
* <h4>Use of Locale</h4> * <h3>Use of Locale</h3>
* *
* <p>Once you've created a <code>Locale</code> you can query it for information * <p>Once you've created a <code>Locale</code> you can query it for information
* about itself. Use <code>getCountry</code> to get the country (or region) * about itself. Use <code>getCountry</code> to get the country (or region)
@ -385,7 +385,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* <STRONG>just</STRONG> a mechanism for identifying objects, * <STRONG>just</STRONG> a mechanism for identifying objects,
* <STRONG>not</STRONG> a container for the objects themselves. * <STRONG>not</STRONG> a container for the objects themselves.
* *
* <h4>Compatibility</h4> * <h3>Compatibility</h3>
* *
* <p>In order to maintain compatibility with existing usage, Locale's * <p>In order to maintain compatibility with existing usage, Locale's
* constructors retain their behavior prior to the Java Runtime * constructors retain their behavior prior to the Java Runtime
@ -410,7 +410,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* Clients desiring a string representation of the complete locale can * Clients desiring a string representation of the complete locale can
* then always rely on <code>toLanguageTag</code> for this purpose. * then always rely on <code>toLanguageTag</code> for this purpose.
* *
* <h5><a id="special_cases_constructor">Special cases</a></h5> * <h4><a id="special_cases_constructor">Special cases</a></h4>
* *
* <p>For compatibility reasons, two * <p>For compatibility reasons, two
* non-conforming locales are treated as special cases. These are * non-conforming locales are treated as special cases. These are
@ -435,7 +435,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* constructor is called with the arguments "th", "TH", "TH", the * constructor is called with the arguments "th", "TH", "TH", the
* extension "u-nu-thai" is automatically added. * extension "u-nu-thai" is automatically added.
* *
* <h5>Serialization</h5> * <h4>Serialization</h4>
* *
* <p>During serialization, writeObject writes all fields to the output * <p>During serialization, writeObject writes all fields to the output
* stream, including extensions. * stream, including extensions.
@ -444,7 +444,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* in <a href="#special_cases_constructor">Special Cases</a>, only * in <a href="#special_cases_constructor">Special Cases</a>, only
* for the two cases th_TH_TH and ja_JP_JP. * for the two cases th_TH_TH and ja_JP_JP.
* *
* <h5>Legacy language codes</h5> * <h4>Legacy language codes</h4>
* *
* <p>Locale's constructor has always converted three language codes to * <p>Locale's constructor has always converted three language codes to
* their earlier, obsoleted forms: {@code he} maps to {@code iw}, * their earlier, obsoleted forms: {@code he} maps to {@code iw},
@ -462,7 +462,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* lookup mechanism also implements this mapping, so that resources * lookup mechanism also implements this mapping, so that resources
* can be named using either convention, see {@link ResourceBundle.Control}. * can be named using either convention, see {@link ResourceBundle.Control}.
* *
* <h5>Three-letter language/country(region) codes</h5> * <h4>Three-letter language/country(region) codes</h4>
* *
* <p>The Locale constructors have always specified that the language * <p>The Locale constructors have always specified that the language
* and the country param be two characters in length, although in * and the country param be two characters in length, although in

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -204,18 +204,18 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
* known concrete subclasses {@code ListResourceBundle} and * known concrete subclasses {@code ListResourceBundle} and
* {@code PropertyResourceBundle} are thread-safe. * {@code PropertyResourceBundle} are thread-safe.
* *
* <h3><a id="resource-bundle-modules">Resource Bundles and Named Modules</a></h3> * <h2><a id="resource-bundle-modules">Resource Bundles and Named Modules</a></h2>
* *
* Resource bundles can be deployed in modules in the following ways: * Resource bundles can be deployed in modules in the following ways:
* *
* <h4>Resource bundles together with an application</h4> * <h3>Resource bundles together with an application</h3>
* *
* Resource bundles can be deployed together with an application in the same * Resource bundles can be deployed together with an application in the same
* module. In that case, the resource bundles are loaded * module. In that case, the resource bundles are loaded
* by code in the module by calling the {@link #getBundle(String)} * by code in the module by calling the {@link #getBundle(String)}
* or {@link #getBundle(String, Locale)} method. * or {@link #getBundle(String, Locale)} method.
* *
* <h4><a id="service-providers">Resource bundles as service providers</a></h4> * <h3><a id="service-providers">Resource bundles as service providers</a></h3>
* *
* Resource bundles can be deployed in one or more <em>service provider modules</em> * Resource bundles can be deployed in one or more <em>service provider modules</em>
* and they can be located using {@link ServiceLoader}. * and they can be located using {@link ServiceLoader}.
@ -232,7 +232,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
* provide resource bundles in any format such XML which replaces the need * provide resource bundles in any format such XML which replaces the need
* of {@link Control ResourceBundle.Control}. * of {@link Control ResourceBundle.Control}.
* *
* <h4><a id="other-modules">Resource bundles in other modules and class path</a></h4> * <h3><a id="other-modules">Resource bundles in other modules and class path</a></h3>
* *
* Resource bundles in a named module may be <em>encapsulated</em> so that * Resource bundles in a named module may be <em>encapsulated</em> so that
* it cannot be located by code in other modules. Resource bundles * it cannot be located by code in other modules. Resource bundles
@ -255,7 +255,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
* resource bundle provider</a>, it does not fall back to the * resource bundle provider</a>, it does not fall back to the
* class loader search. * class loader search.
* *
* <h4>Resource bundles in automatic modules</h4> * <h3>Resource bundles in automatic modules</h3>
* *
* A common format of resource bundles is in {@linkplain PropertyResourceBundle * A common format of resource bundles is in {@linkplain PropertyResourceBundle
* .properties} file format. Typically {@code .properties} resource bundles * .properties} file format. Typically {@code .properties} resource bundles
@ -300,7 +300,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
* the first one returned from {@link ServiceLoader} will be used. * the first one returned from {@link ServiceLoader} will be used.
* A custom {@link Control} implementation is ignored by named modules. * A custom {@link Control} implementation is ignored by named modules.
* *
* <h3>Cache Management</h3> * <h2>Cache Management</h2>
* *
* Resource bundle instances created by the <code>getBundle</code> factory * Resource bundle instances created by the <code>getBundle</code> factory
* methods are cached by default, and the factory methods return the same * methods are cached by default, and the factory methods return the same
@ -316,7 +316,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
* Control#needsReload(String, Locale, String, ClassLoader, ResourceBundle, * Control#needsReload(String, Locale, String, ClassLoader, ResourceBundle,
* long) ResourceBundle.Control.needsReload} for details. * long) ResourceBundle.Control.needsReload} for details.
* *
* <h3>Example</h3> * <h2>Example</h2>
* *
* The following is a very simple example of a <code>ResourceBundle</code> * The following is a very simple example of a <code>ResourceBundle</code>
* subclass, <code>MyResources</code>, that manages two resources (for a larger number of * subclass, <code>MyResources</code>, that manages two resources (for a larger number of

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -155,7 +155,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* {@link #reset} method will reset the value of the scanner's radix to * {@link #reset} method will reset the value of the scanner's radix to
* {@code 10} regardless of whether it was previously changed. * {@code 10} regardless of whether it was previously changed.
* *
* <h3> <a id="localized-numbers">Localized numbers</a> </h3> * <h2> <a id="localized-numbers">Localized numbers</a> </h2>
* *
* <p> An instance of this class is capable of scanning numbers in the standard * <p> An instance of this class is capable of scanning numbers in the standard
* formats as well as in the formats of the scanner's locale. A scanner's * formats as well as in the formats of the scanner's locale. A scanner's
@ -216,7 +216,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* getInfinity()} * getInfinity()}
* </dl></blockquote> * </dl></blockquote>
* *
* <h4> <a id="number-syntax">Number syntax</a> </h4> * <h3> <a id="number-syntax">Number syntax</a> </h3>
* *
* <p> The strings that can be parsed as numbers by an instance of this class * <p> The strings that can be parsed as numbers by an instance of this class
* are specified in terms of the following regular-expression grammar, where * are specified in terms of the following regular-expression grammar, where

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -69,7 +69,7 @@ import jdk.internal.reflect.Reflection;
* service providers (based on the functionality they expose through the service), * service providers (based on the functionality they expose through the service),
* and handling the possibility that no service providers are located. * and handling the possibility that no service providers are located.
* *
* <h3> Obtaining a service loader </h3> * <h2> Obtaining a service loader </h2>
* *
* <p> An application obtains a service loader for a given service by invoking * <p> An application obtains a service loader for a given service by invoking
* one of the static {@code load} methods of {@code ServiceLoader}. If the * one of the static {@code load} methods of {@code ServiceLoader}. If the
@ -141,7 +141,7 @@ import jdk.internal.reflect.Reflection;
* <li> {@code get()} yields an instance of {@code CodecFactory} </li> * <li> {@code get()} yields an instance of {@code CodecFactory} </li>
* </ol> * </ol>
* *
* <h3> Designing services </h3> * <h2> Designing services </h2>
* *
* <p> A service is a single type, usually an interface or abstract class. A * <p> A service is a single type, usually an interface or abstract class. A
* concrete class can be used, but this is not recommended. The type may have * concrete class can be used, but this is not recommended. The type may have
@ -167,7 +167,7 @@ import jdk.internal.reflect.Reflection;
* or complicated to produce certain codecs. </p></li> * or complicated to produce certain codecs. </p></li>
* </ol> * </ol>
* *
* <h3> <a id="developing-service-providers">Developing service providers</a> </h3> * <h2> <a id="developing-service-providers">Developing service providers</a> </h2>
* *
* <p> A service provider is a single type, usually a concrete class. An * <p> A service provider is a single type, usually a concrete class. An
* interface or abstract class is permitted because it may declare a static * interface or abstract class is permitted because it may declare a static
@ -188,7 +188,7 @@ import jdk.internal.reflect.Reflection;
* the service loader's stream, without knowledge of the service providers' * the service loader's stream, without knowledge of the service providers'
* locations. * locations.
* *
* <h3> Deploying service providers as modules </h3> * <h2> Deploying service providers as modules </h2>
* *
* <p> A service provider that is developed in a module must be specified in a * <p> A service provider that is developed in a module must be specified in a
* <i>provides</i> directive in the module declaration. The provides directive * <i>provides</i> directive in the module declaration. The provides directive
@ -253,7 +253,7 @@ import jdk.internal.reflect.Reflection;
* the service provider) will be instantiated by an entity (that is, a service * the service provider) will be instantiated by an entity (that is, a service
* loader) which is outside the class's package. * loader) which is outside the class's package.
* *
* <h3> Deploying service providers on the class path </h3> * <h2> Deploying service providers on the class path </h2>
* *
* A service provider that is packaged as a JAR file for the class path is * A service provider that is packaged as a JAR file for the class path is
* identified by placing a <i>provider-configuration file</i> in the resource * identified by placing a <i>provider-configuration file</i> in the resource
@ -293,7 +293,7 @@ import jdk.internal.reflect.Reflection;
* not necessarily the class loader which ultimately locates the * not necessarily the class loader which ultimately locates the
* provider-configuration file. * provider-configuration file.
* *
* <h3> Timing of provider discovery </h3> * <h2> Timing of provider discovery </h2>
* *
* <p> Service providers are loaded and instantiated lazily, that is, on demand. * <p> Service providers are loaded and instantiated lazily, that is, on demand.
* A service loader maintains a cache of the providers that have been loaded so * A service loader maintains a cache of the providers that have been loaded so
@ -306,7 +306,7 @@ import jdk.internal.reflect.Reflection;
* locates any remaining providers. Caches are cleared via the {@link #reload * locates any remaining providers. Caches are cleared via the {@link #reload
* reload} method. * reload} method.
* *
* <h3> <a id="errors">Errors</a> </h3> * <h2> <a id="errors">Errors</a> </h2>
* *
* <p> When using the service loader's {@code iterator}, the {@link * <p> When using the service loader's {@code iterator}, the {@link
* Iterator#hasNext() hasNext} and {@link Iterator#next() next} methods will * Iterator#hasNext() hasNext} and {@link Iterator#next() next} methods will
@ -361,7 +361,7 @@ import jdk.internal.reflect.Reflection;
* *
* </ul> * </ul>
* *
* <h3> Security </h3> * <h2> Security </h2>
* *
* <p> Service loaders always execute in the security context of the caller * <p> Service loaders always execute in the security context of the caller
* of the iterator or stream methods and may also be restricted by the security * of the iterator or stream methods and may also be restricted by the security
@ -370,7 +370,7 @@ import jdk.internal.reflect.Reflection;
* the methods of the iterators which they return, from within a privileged * the methods of the iterators which they return, from within a privileged
* security context. * security context.
* *
* <h3> Concurrency </h3> * <h2> Concurrency </h2>
* *
* <p> Instances of this class are not safe for use by multiple concurrent * <p> Instances of this class are not safe for use by multiple concurrent
* threads. * threads.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -114,7 +114,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* </pre></blockquote> * </pre></blockquote>
* For example, TimeZone.getTimeZone("GMT-8").getID() returns "GMT-08:00". * For example, TimeZone.getTimeZone("GMT-8").getID() returns "GMT-08:00".
* *
* <h3>Three-letter time zone IDs</h3> * <h2>Three-letter time zone IDs</h2>
* *
* For compatibility with JDK 1.1.x, some other three-letter time zone IDs * For compatibility with JDK 1.1.x, some other three-letter time zone IDs
* (such as "PST", "CTT", "AST") are also supported. However, <strong>their * (such as "PST", "CTT", "AST") are also supported. However, <strong>their

View file

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- <!--
Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -29,14 +29,14 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head> </head>
<body> <body>
<h2>Java Collections API Design FAQ</h2> <h1>Java Collections API Design FAQ</h1>
<!-- Body text begins here --> <!-- Body text begins here -->
<hr> <hr>
This document answers frequently asked questions concerning the This document answers frequently asked questions concerning the
design of the Java collections framework. It is derived from the design of the Java collections framework. It is derived from the
large volume of traffic on the collections-comments alias. It large volume of traffic on the collections-comments alias. It
serves as a design rationale for the collections framework. serves as a design rationale for the collections framework.
<h3>Core Interfaces - General Questions</h3> <h2>Core Interfaces - General Questions</h2>
<ol> <ol>
<li><a href="#a1"><b>Why don't you support immutability directly in <li><a href="#a1"><b>Why don't you support immutability directly in
the core collection interfaces so that you can do away with the core collection interfaces so that you can do away with
@ -50,7 +50,7 @@ throw an UnsupportedOperationException?</b></a></li>
<li><a href="#a28"><b>Why didn't you use "Beans-style names" for <li><a href="#a28"><b>Why didn't you use "Beans-style names" for
consistency?</b></a></li> consistency?</b></a></li>
</ol> </ol>
<h3>Collection Interface</h3> <h2>Collection Interface</h2>
<ol> <ol>
<li><a href="#a5"><b>Why doesn't Collection extend Cloneable and <li><a href="#a5"><b>Why doesn't Collection extend Cloneable and
Serializable?</b></a></li> Serializable?</b></a></li>
@ -67,7 +67,7 @@ JDK have Enumeration (or Iterator) constructors?</b></a></li>
<li><a href="#a10"><b>Why don't you provide an Iterator.add <li><a href="#a10"><b>Why don't you provide an Iterator.add
method?</b></a></li> method?</b></a></li>
</ol> </ol>
<h3>List Interface</h3> <h2>List Interface</h2>
<ol> <ol>
<li><a href="#a11"><b>Why don't you rename the List interface to <li><a href="#a11"><b>Why don't you rename the List interface to
Sequence; doesn't "list" generally suggest "linked list"? Also, Sequence; doesn't "list" generally suggest "linked list"? Also,
@ -75,12 +75,12 @@ doesn't it conflict with java.awt.List?</b></a></li>
<li><a href="#a12"><b>Why don't you rename List's set method to <li><a href="#a12"><b>Why don't you rename List's set method to
replace, to avoid confusion with Set.</b></a></li> replace, to avoid confusion with Set.</b></a></li>
</ol> </ol>
<h3>Map Interface</h3> <h2>Map Interface</h2>
<ol> <ol>
<li><a href="#a14"><b>Why doesn't Map extend <li><a href="#a14"><b>Why doesn't Map extend
Collection?</b></a></li> Collection?</b></a></li>
</ol> </ol>
<h3>Iterator Interface</h3> <h2>Iterator Interface</h2>
<ol> <ol>
<li><a href="#a18"><b>Why doesn't Iterator extend <li><a href="#a18"><b>Why doesn't Iterator extend
Enumeration?</b></a></li> Enumeration?</b></a></li>
@ -88,7 +88,7 @@ Enumeration?</b></a></li>
that allows you to look at the next element in an iteration without that allows you to look at the next element in an iteration without
advancing the iterator?</b></a></li> advancing the iterator?</b></a></li>
</ol> </ol>
<h3>Miscellaneous</h3> <h2>Miscellaneous</h2>
<ol> <ol>
<li><a href="#a23"><b>Why did you write a new collections framework <li><a href="#a23"><b>Why did you write a new collections framework
instead of adopting JGL (a preexisting collections package from instead of adopting JGL (a preexisting collections package from
@ -102,7 +102,7 @@ collections that send out Events when they're
modified?</b></a></li> modified?</b></a></li>
</ol> </ol>
<hr> <hr>
<h3>Core Interfaces - General Questions</h3> <h2>Core Interfaces - General Questions</h2>
<ol> <ol>
<li><a id="a1"><b>Why don't you support immutability <li><a id="a1"><b>Why don't you support immutability
directly in the core collection interfaces so that you can do away directly in the core collection interfaces so that you can do away
@ -204,7 +204,7 @@ case. Thus, we adopted the "traditional" JDK style rather than the
Beans style.</li> Beans style.</li>
</ol> </ol>
<hr> <hr>
<h3>Collection Interface</h3> <h2>Collection Interface</h2>
<ol> <ol>
<li><a id="a5"><b>Why doesn't Collection extend Cloneable <li><a id="a5"><b>Why doesn't Collection extend Cloneable
and Serializable?</b></a> and Serializable?</b></a>
@ -264,7 +264,7 @@ guarantee the order of the iteration.</p>
</li> </li>
</ol> </ol>
<hr> <hr>
<h3>List Interface</h3> <h2>List Interface</h2>
<ol> <ol>
<li><a id="a11"><b>Why don't you rename the List <li><a id="a11"><b>Why don't you rename the List
interface to Sequence; doesn't "list" generally suggest "linked interface to Sequence; doesn't "list" generally suggest "linked
@ -288,7 +288,7 @@ enough enshrined in the language that we'd stick with it.</p>
</li> </li>
</ol> </ol>
<hr> <hr>
<h3>Map Interface</h3> <h2>Map Interface</h2>
<ol> <ol>
<li><a id="a14"><b>Why doesn't Map extend <li><a id="a14"><b>Why doesn't Map extend
Collection?</b></a> Collection?</b></a>
@ -314,7 +314,7 @@ Lists.</p>
</li> </li>
</ol> </ol>
<hr> <hr>
<h3>Iterator Interface</h3> <h2>Iterator Interface</h2>
<ol> <ol>
<li><a id="a18"><b>Why doesn't Iterator extend <li><a id="a18"><b>Why doesn't Iterator extend
Enumeration?</b></a> Enumeration?</b></a>
@ -335,7 +335,7 @@ that everyone has to implement.</p>
</li> </li>
</ol> </ol>
<hr> <hr>
<h3>Miscellaneous</h3> <h2>Miscellaneous</h2>
<ol> <ol>
<li><a id="a23"><b>Why did you write a new collections <li><a id="a23"><b>Why did you write a new collections
framework instead of adopting JGL (a preexisting collections framework instead of adopting JGL (a preexisting collections

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -77,7 +77,7 @@ import java.util.stream.StreamSupport;
* such use. * such use.
* *
* *
* <h3><a id="sum">Summary of regular-expression constructs</a></h3> * <h2><a id="sum">Summary of regular-expression constructs</a></h2>
* *
* <table class="borderless"> * <table class="borderless">
* <caption style="display:none">Regular expression constructs, and what they match</caption> * <caption style="display:none">Regular expression constructs, and what they match</caption>
@ -378,7 +378,7 @@ import java.util.stream.StreamSupport;
* <hr> * <hr>
* *
* *
* <h3><a id="bs">Backslashes, escapes, and quoting</a></h3> * <h2><a id="bs">Backslashes, escapes, and quoting</a></h2>
* *
* <p> The backslash character ({@code '\'}) serves to introduce escaped * <p> The backslash character ({@code '\'}) serves to introduce escaped
* constructs, as defined in the table above, as well as to quote characters * constructs, as defined in the table above, as well as to quote characters
@ -406,7 +406,7 @@ import java.util.stream.StreamSupport;
* {@code (hello)} the string literal {@code "\\(hello\\)"} * {@code (hello)} the string literal {@code "\\(hello\\)"}
* must be used. * must be used.
* *
* <h3><a id="cc">Character Classes</a></h3> * <h2><a id="cc">Character Classes</a></h2>
* *
* <p> Character classes may appear within other character classes, and * <p> Character classes may appear within other character classes, and
* may be composed by the union operator (implicit) and the intersection * may be composed by the union operator (implicit) and the intersection
@ -449,7 +449,7 @@ import java.util.stream.StreamSupport;
* character class, while the expression {@code -} becomes a range * character class, while the expression {@code -} becomes a range
* forming metacharacter. * forming metacharacter.
* *
* <h3><a id="lt">Line terminators</a></h3> * <h2><a id="lt">Line terminators</a></h2>
* *
* <p> A <i>line terminator</i> is a one- or two-character sequence that marks * <p> A <i>line terminator</i> is a one- or two-character sequence that marks
* the end of a line of the input character sequence. The following are * the end of a line of the input character sequence. The following are
@ -484,9 +484,9 @@ import java.util.stream.StreamSupport;
* except at the end of input. When in {@link #MULTILINE} mode {@code $} * except at the end of input. When in {@link #MULTILINE} mode {@code $}
* matches just before a line terminator or the end of the input sequence. * matches just before a line terminator or the end of the input sequence.
* *
* <h3><a id="cg">Groups and capturing</a></h3> * <h2><a id="cg">Groups and capturing</a></h2>
* *
* <h4><a id="gnumber">Group number</a></h4> * <h3><a id="gnumber">Group number</a></h3>
* <p> Capturing groups are numbered by counting their opening parentheses from * <p> Capturing groups are numbered by counting their opening parentheses from
* left to right. In the expression {@code ((A)(B(C)))}, for example, there * left to right. In the expression {@code ((A)(B(C)))}, for example, there
* are four such groups: </p> * are four such groups: </p>
@ -505,7 +505,7 @@ import java.util.stream.StreamSupport;
* subsequence may be used later in the expression, via a back reference, and * subsequence may be used later in the expression, via a back reference, and
* may also be retrieved from the matcher once the match operation is complete. * may also be retrieved from the matcher once the match operation is complete.
* *
* <h4><a id="groupname">Group name</a></h4> * <h3><a id="groupname">Group name</a></h3>
* <p>A capturing group can also be assigned a "name", a {@code named-capturing group}, * <p>A capturing group can also be assigned a "name", a {@code named-capturing group},
* and then be back-referenced later by the "name". Group names are composed of * and then be back-referenced later by the "name". Group names are composed of
* the following characters. The first character must be a {@code letter}. * the following characters. The first character must be a {@code letter}.
@ -534,7 +534,7 @@ import java.util.stream.StreamSupport;
* that do not capture text and do not count towards the group total, or * that do not capture text and do not count towards the group total, or
* <i>named-capturing</i> group. * <i>named-capturing</i> group.
* *
* <h3> Unicode support </h3> * <h2> Unicode support </h2>
* *
* <p> This class is in conformance with Level 1 of <a * <p> This class is in conformance with Level 1 of <a
* href="http://www.unicode.org/reports/tr18/"><i>Unicode Technical * href="http://www.unicode.org/reports/tr18/"><i>Unicode Technical
@ -688,7 +688,7 @@ import java.util.stream.StreamSupport;
* available through the same <code>\p{</code><i>prop</i><code>}</code> syntax where * available through the same <code>\p{</code><i>prop</i><code>}</code> syntax where
* the specified property has the name <code>java<i>methodname</i></code></a>. * the specified property has the name <code>java<i>methodname</i></code></a>.
* *
* <h3> Comparison to Perl 5 </h3> * <h2> Comparison to Perl 5 </h2>
* *
* <p>The {@code Pattern} engine performs traditional NFA-based matching * <p>The {@code Pattern} engine performs traditional NFA-based matching
* with ordered alternation as occurs in Perl 5. * with ordered alternation as occurs in Perl 5.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,7 +42,7 @@ import java.util.Locale;
* interfaces to offer support for locales beyond the set of locales * interfaces to offer support for locales beyond the set of locales
* supported by the Java runtime environment itself. * supported by the Java runtime environment itself.
* *
* <h3>Packaging of Locale Sensitive Service Provider Implementations</h3> * <h2>Packaging of Locale Sensitive Service Provider Implementations</h2>
* Implementations of these locale sensitive services can be made available * Implementations of these locale sensitive services can be made available
* by adding them to the application's class path. A provider identifies itself with a * by adding them to the application's class path. A provider identifies itself with a
* provider-configuration file in the resource directory META-INF/services, * provider-configuration file in the resource directory META-INF/services,
@ -75,7 +75,7 @@ import java.util.Locale;
* </pre> * </pre>
* which is the fully qualified class name of the class implementing * which is the fully qualified class name of the class implementing
* <code>DateFormatProvider</code>. * <code>DateFormatProvider</code>.
* <h4>Invocation of Locale Sensitive Services</h4> * <h3>Invocation of Locale Sensitive Services</h3>
* <p> * <p>
* Locale sensitive factory methods and methods for name retrieval in the * Locale sensitive factory methods and methods for name retrieval in the
* <code>java.text</code> and <code>java.util</code> packages invoke * <code>java.text</code> and <code>java.util</code> packages invoke

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,7 +35,7 @@ import java.util.ResourceBundle;
* factory methods to locate and load the service providers that are deployed as * factory methods to locate and load the service providers that are deployed as
* modules via {@link java.util.ServiceLoader ServiceLoader}. * modules via {@link java.util.ServiceLoader ServiceLoader}.
* *
* <h3>Developing resource bundle services</h3> * <h2>Developing resource bundle services</h2>
* *
* A service for a resource bundle of a given <em>{@code baseName}</em> must have * A service for a resource bundle of a given <em>{@code baseName}</em> must have
* a fully-qualified class name of the form: * a fully-qualified class name of the form:
@ -55,7 +55,7 @@ import java.util.ResourceBundle;
* } * }
* }</pre></blockquote> * }</pre></blockquote>
* *
* <h3>Deploying resource bundle service providers</h3> * <h2>Deploying resource bundle service providers</h2>
* *
* Resource bundles can be deployed in one or more service providers * Resource bundles can be deployed in one or more service providers
* in modules. For example, a provider for a service * in modules. For example, a provider for a service
@ -114,7 +114,7 @@ import java.util.ResourceBundle;
* provides com.example.app.spi.MyResourcesProvider with com.example.impl.MyResourcesProviderImpl; * provides com.example.app.spi.MyResourcesProvider with com.example.impl.MyResourcesProviderImpl;
* </pre> * </pre>
* *
* <h3><a id="obtain-resource-bundle">Obtaining resource bundles from providers</a></h3> * <h2><a id="obtain-resource-bundle">Obtaining resource bundles from providers</a></h2>
* *
* The module declaration of the <em>consumer module</em> that calls one of the * The module declaration of the <em>consumer module</em> that calls one of the
* {@code ResourceBundle.getBundle} factory methods to obtain a resource * {@code ResourceBundle.getBundle} factory methods to obtain a resource