mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8230648: Replace @exception tag with @throws in java.base
Minor coding style update of javadoc tag in any file in java.base Reviewed-by: prappo, lancea
This commit is contained in:
parent
2fc6c6459d
commit
b15b322cf3
196 changed files with 1959 additions and 1962 deletions
|
@ -199,9 +199,9 @@ interface MethodHandleInfo {
|
|||
* @param expected a class object representing the desired result type {@code T}
|
||||
* @param lookup the lookup object that created this MethodHandleInfo, or one with equivalent access privileges
|
||||
* @return a reference to the method, constructor, or field object
|
||||
* @exception ClassCastException if the member is not of the expected type
|
||||
* @exception NullPointerException if either argument is {@code null}
|
||||
* @exception IllegalArgumentException if the underlying member is not accessible to the given lookup object
|
||||
* @throws ClassCastException if the member is not of the expected type
|
||||
* @throws NullPointerException if either argument is {@code null}
|
||||
* @throws IllegalArgumentException if the underlying member is not accessible to the given lookup object
|
||||
*/
|
||||
public <T extends Member> T reflectAs(Class<T> expected, Lookup lookup);
|
||||
|
||||
|
@ -243,7 +243,7 @@ interface MethodHandleInfo {
|
|||
* The conventional prefix "REF_" is omitted.
|
||||
* @param referenceKind an integer code for a kind of reference used to access a class member
|
||||
* @return a mixed-case string such as {@code "getField"}
|
||||
* @exception IllegalArgumentException if the argument is not a valid
|
||||
* @throws IllegalArgumentException if the argument is not a valid
|
||||
* <a href="MethodHandleInfo.html#refkinds">reference kind number</a>
|
||||
*/
|
||||
public static String referenceKindToString(int referenceKind) {
|
||||
|
@ -278,9 +278,9 @@ interface MethodHandleInfo {
|
|||
* @param name the {@linkplain #getName member name} part of the symbolic reference
|
||||
* @param type the {@linkplain #getMethodType method type} part of the symbolic reference
|
||||
* @return a string of the form {@code "RK C.N:MT"}
|
||||
* @exception IllegalArgumentException if the first argument is not a valid
|
||||
* @throws IllegalArgumentException if the first argument is not a valid
|
||||
* <a href="MethodHandleInfo.html#refkinds">reference kind number</a>
|
||||
* @exception NullPointerException if any reference argument is {@code null}
|
||||
* @throws NullPointerException if any reference argument is {@code null}
|
||||
*/
|
||||
public static String toString(int kind, Class<?> defc, String name, MethodType type) {
|
||||
Objects.requireNonNull(name); Objects.requireNonNull(type);
|
||||
|
|
|
@ -274,10 +274,10 @@ public class MethodHandles {
|
|||
* @param target a direct method handle to crack into symbolic reference components
|
||||
* @param expected a class object representing the desired result type {@code T}
|
||||
* @return a reference to the method, constructor, or field object
|
||||
* @exception SecurityException if the caller is not privileged to call {@code setAccessible}
|
||||
* @exception NullPointerException if either argument is {@code null}
|
||||
* @exception IllegalArgumentException if the target is not a direct method handle
|
||||
* @exception ClassCastException if the member is not of the expected type
|
||||
* @throws SecurityException if the caller is not privileged to call {@code setAccessible}
|
||||
* @throws NullPointerException if either argument is {@code null}
|
||||
* @throws IllegalArgumentException if the target is not a direct method handle
|
||||
* @throws ClassCastException if the member is not of the expected type
|
||||
* @since 1.8
|
||||
*/
|
||||
public static <T extends Member> T
|
||||
|
@ -1754,7 +1754,7 @@ assertEquals("[x, y]", MH_asList.invoke("x", "y").toString());
|
|||
* or if the method is not {@code static},
|
||||
* or if the method's variable arity modifier bit
|
||||
* is set and {@code asVarargsCollector} fails
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
*/
|
||||
|
@ -1839,7 +1839,7 @@ assertEquals("", (String) MH_newString.invokeExact());
|
|||
* or if the method is {@code static},
|
||||
* or if the method's variable arity modifier bit
|
||||
* is set and {@code asVarargsCollector} fails
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
*/
|
||||
|
@ -1913,7 +1913,7 @@ assertEquals("[x, y, z]", pb.command().toString());
|
|||
* @throws IllegalAccessException if access checking fails
|
||||
* or if the method's variable arity modifier bit
|
||||
* is set and {@code asVarargsCollector} fails
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
*/
|
||||
|
@ -1941,13 +1941,13 @@ assertEquals("[x, y, z]", pb.command().toString());
|
|||
*
|
||||
* @param targetName the fully qualified name of the class to be looked up.
|
||||
* @return the requested class.
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws LinkageError if the linkage fails
|
||||
* @throws ClassNotFoundException if the class cannot be loaded by the lookup class' loader.
|
||||
* @throws IllegalAccessException if the class is not accessible, using the allowed access
|
||||
* modes.
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
*
|
||||
* @jls 12.2 Loading of Classes and Interfaces
|
||||
|
@ -2022,7 +2022,7 @@ assertEquals("[x, y, z]", pb.command().toString());
|
|||
* @return the class that has been access-checked
|
||||
* @throws IllegalAccessException if the class is not accessible from the lookup class
|
||||
* and previous lookup class, if present, using the allowed access modes.
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @since 9
|
||||
* @see <a href="#cross-module-lookup">Cross-module lookups</a>
|
||||
|
@ -2104,7 +2104,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
|
|||
* or if the method is {@code static},
|
||||
* or if the method's variable arity modifier bit
|
||||
* is set and {@code asVarargsCollector} fails
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
*/
|
||||
|
@ -2129,7 +2129,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
|
|||
* @return a method handle which can load values from the field
|
||||
* @throws NoSuchFieldException if the field does not exist
|
||||
* @throws IllegalAccessException if access checking fails, or if the field is {@code static}
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
* @see #findVarHandle(Class, String, Class)
|
||||
|
@ -2153,7 +2153,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
|
|||
* @throws NoSuchFieldException if the field does not exist
|
||||
* @throws IllegalAccessException if access checking fails, or if the field is {@code static}
|
||||
* or {@code final}
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
* @see #findVarHandle(Class, String, Class)
|
||||
|
@ -2226,7 +2226,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
|
|||
* @return a VarHandle giving access to non-static fields.
|
||||
* @throws NoSuchFieldException if the field does not exist
|
||||
* @throws IllegalAccessException if access checking fails, or if the field is {@code static}
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
* @since 9
|
||||
|
@ -2252,7 +2252,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
|
|||
* @return a method handle which can load values from the field
|
||||
* @throws NoSuchFieldException if the field does not exist
|
||||
* @throws IllegalAccessException if access checking fails, or if the field is not {@code static}
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
*/
|
||||
|
@ -2277,7 +2277,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
|
|||
* @throws NoSuchFieldException if the field does not exist
|
||||
* @throws IllegalAccessException if access checking fails, or if the field is not {@code static}
|
||||
* or is {@code final}
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
*/
|
||||
|
@ -2351,7 +2351,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method
|
|||
* @return a VarHandle giving access to a static field
|
||||
* @throws NoSuchFieldException if the field does not exist
|
||||
* @throws IllegalAccessException if access checking fails, or if the field is not {@code static}
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
* @since 9
|
||||
|
@ -2405,7 +2405,7 @@ return mh1;
|
|||
* @throws IllegalAccessException if access checking fails
|
||||
* or if the method's variable arity modifier bit
|
||||
* is set and {@code asVarargsCollector} fails
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws NullPointerException if any argument is null
|
||||
* @see MethodHandle#bindTo
|
||||
|
@ -2707,10 +2707,10 @@ return mh1;
|
|||
* and was created by a lookup object for a different class.
|
||||
* @param target a direct method handle to crack into symbolic reference components
|
||||
* @return a symbolic reference which can be used to reconstruct this method handle from this lookup object
|
||||
* @exception SecurityException if a security manager is present and it
|
||||
* @throws SecurityException if a security manager is present and it
|
||||
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
|
||||
* @throws IllegalArgumentException if the target is not a direct method handle or if access checking fails
|
||||
* @exception NullPointerException if the target is {@code null}
|
||||
* @throws NullPointerException if the target is {@code null}
|
||||
* @see MethodHandleInfo
|
||||
* @since 1.8
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014, 2017, 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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -139,4 +139,4 @@ final class VarForm {
|
|||
}
|
||||
return table;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue