提交 4e048aa1 编写于 作者: D darcy

8017550: Fix doclint issues in java.lang and subpackages

Reviewed-by: alanb, chegar
上级 3eb9388e
/* /*
* Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1994, 2013, 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
...@@ -205,9 +205,9 @@ public final class Boolean implements java.io.Serializable, ...@@ -205,9 +205,9 @@ public final class Boolean implements java.io.Serializable,
* Returns a hash code for a {@code boolean} value; compatible with * Returns a hash code for a {@code boolean} value; compatible with
* {@code Boolean.hashCode()}. * {@code Boolean.hashCode()}.
* *
* @since 1.8 * @param value the value to hash
*
* @return a hash code value for a {@code boolean} value. * @return a hash code value for a {@code boolean} value.
* @since 1.8
*/ */
public static int hashCode(boolean value) { public static int hashCode(boolean value) {
return value ? 1231 : 1237; return value ? 1231 : 1237;
......
/* /*
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2013, 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
...@@ -398,9 +398,9 @@ public final class Byte extends Number implements Comparable<Byte> { ...@@ -398,9 +398,9 @@ public final class Byte extends Number implements Comparable<Byte> {
* Returns a hash code for a {@code byte} value; compatible with * Returns a hash code for a {@code byte} value; compatible with
* {@code Byte.hashCode()}. * {@code Byte.hashCode()}.
* *
* @since 1.8 * @param value the value to hash
*
* @return a hash code value for a {@code byte} value. * @return a hash code value for a {@code byte} value.
* @since 1.8
*/ */
public static int hashCode(byte value) { public static int hashCode(byte value) {
return (int)value; return (int)value;
......
...@@ -3250,6 +3250,8 @@ public final class Class<T> implements java.io.Serializable, ...@@ -3250,6 +3250,8 @@ public final class Class<T> implements java.io.Serializable,
* could not be checked at runtime (because generic types are implemented * could not be checked at runtime (because generic types are implemented
* by erasure). * by erasure).
* *
* @param <U> the type to cast this class object to
* @param clazz the class of the type to cast this class object to
* @return this {@code Class} object, cast to represent a subclass of * @return this {@code Class} object, cast to represent a subclass of
* the specified class object. * the specified class object.
* @throws ClassCastException if this {@code Class} object does not * @throws ClassCastException if this {@code Class} object does not
...@@ -3405,6 +3407,7 @@ public final class Class<T> implements java.io.Serializable, ...@@ -3405,6 +3407,7 @@ public final class Class<T> implements java.io.Serializable,
* If this Class represents either the Object class, an interface type, an * If this Class represents either the Object class, an interface type, an
* array type, a primitive type, or void, the return value is null. * array type, a primitive type, or void, the return value is null.
* *
* @return an object representing the superclass
* @since 1.8 * @since 1.8
*/ */
public AnnotatedType getAnnotatedSuperclass() { public AnnotatedType getAnnotatedSuperclass() {
...@@ -3436,6 +3439,7 @@ public final class Class<T> implements java.io.Serializable, ...@@ -3436,6 +3439,7 @@ public final class Class<T> implements java.io.Serializable,
* If this Class represents either the Object class, an array type, a * If this Class represents either the Object class, an array type, a
* primitive type, or void, the return value is an array of length 0. * primitive type, or void, the return value is an array of length 0.
* *
* @return an array representing the superinterfaces
* @since 1.8 * @since 1.8
*/ */
public AnnotatedType[] getAnnotatedInterfaces() { public AnnotatedType[] getAnnotatedInterfaces() {
......
...@@ -453,8 +453,7 @@ public final class Double extends Number implements Comparable<Double> { ...@@ -453,8 +453,7 @@ public final class Double extends Number implements Comparable<Double> {
* a {@code NumberFormatException} be thrown, the regular * a {@code NumberFormatException} be thrown, the regular
* expression below can be used to screen the input string: * expression below can be used to screen the input string:
* *
* <code> * <pre>{@code
* <pre>
* final String Digits = "(\\p{Digit}+)"; * final String Digits = "(\\p{Digit}+)";
* final String HexDigits = "(\\p{XDigit}+)"; * final String HexDigits = "(\\p{XDigit}+)";
* // an exponent is 'e' or 'E' followed by an optionally * // an exponent is 'e' or 'E' followed by an optionally
...@@ -474,7 +473,7 @@ public final class Double extends Number implements Comparable<Double> { ...@@ -474,7 +473,7 @@ public final class Double extends Number implements Comparable<Double> {
* // in addition to strings of floating-point literals, the * // in addition to strings of floating-point literals, the
* // two sub-patterns below are simplifications of the grammar * // two sub-patterns below are simplifications of the grammar
* // productions from section 3.10.2 of * // productions from section 3.10.2 of
* // <cite>The Java&trade; Language Specification</cite>. * // The Java Language Specification.
* *
* // Digits ._opt Digits_opt ExponentPart_opt FloatTypeSuffix_opt * // Digits ._opt Digits_opt ExponentPart_opt FloatTypeSuffix_opt
* "((("+Digits+"(\\.)?("+Digits+"?)("+Exp+")?)|"+ * "((("+Digits+"(\\.)?("+Digits+"?)("+Exp+")?)|"+
...@@ -499,8 +498,7 @@ public final class Double extends Number implements Comparable<Double> { ...@@ -499,8 +498,7 @@ public final class Double extends Number implements Comparable<Double> {
* else { * else {
* // Perform suitable alternative action * // Perform suitable alternative action
* } * }
* </pre> * }</pre>
* </code>
* *
* @param s the string to be parsed. * @param s the string to be parsed.
* @return a {@code Double} object holding the value * @return a {@code Double} object holding the value
...@@ -756,9 +754,9 @@ public final class Double extends Number implements Comparable<Double> { ...@@ -756,9 +754,9 @@ public final class Double extends Number implements Comparable<Double> {
* Returns a hash code for a {@code double} value; compatible with * Returns a hash code for a {@code double} value; compatible with
* {@code Double.hashCode()}. * {@code Double.hashCode()}.
* *
* @since 1.8 * @param value the value to hash
*
* @return a hash code value for a {@code double} value. * @return a hash code value for a {@code double} value.
* @since 1.8
*/ */
public static int hashCode(double value) { public static int hashCode(double value) {
long bits = doubleToLongBits(value); long bits = doubleToLongBits(value);
......
...@@ -664,9 +664,9 @@ public final class Float extends Number implements Comparable<Float> { ...@@ -664,9 +664,9 @@ public final class Float extends Number implements Comparable<Float> {
* Returns a hash code for a {@code float} value; compatible with * Returns a hash code for a {@code float} value; compatible with
* {@code Float.hashCode()}. * {@code Float.hashCode()}.
* *
* @since 1.8 * @param value the value to hash
*
* @return a hash code value for a {@code float} value. * @return a hash code value for a {@code float} value.
* @since 1.8
*/ */
public static int hashCode(float value) { public static int hashCode(float value) {
return floatToIntBits(value); return floatToIntBits(value);
......
...@@ -951,6 +951,7 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -951,6 +951,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* Returns a hash code for a {@code int} value; compatible with * Returns a hash code for a {@code int} value; compatible with
* {@code Integer.hashCode()}. * {@code Integer.hashCode()}.
* *
* @param value the value to hash
* @since 1.8 * @since 1.8
* *
* @return a hash code value for a {@code int} value. * @return a hash code value for a {@code int} value.
...@@ -1336,6 +1337,7 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1336,6 +1337,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* one-bits in its two's complement binary representation, that is, if it * one-bits in its two's complement binary representation, that is, if it
* is equal to zero. * is equal to zero.
* *
* @param i the value whose highest one bit is to be computed
* @return an {@code int} value with a single one-bit, in the position * @return an {@code int} value with a single one-bit, in the position
* of the highest-order one-bit in the specified value, or zero if * of the highest-order one-bit in the specified value, or zero if
* the specified value is itself equal to zero. * the specified value is itself equal to zero.
...@@ -1358,6 +1360,7 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1358,6 +1360,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* one-bits in its two's complement binary representation, that is, if it * one-bits in its two's complement binary representation, that is, if it
* is equal to zero. * is equal to zero.
* *
* @param i the value whose lowest one bit is to be computed
* @return an {@code int} value with a single one-bit, in the position * @return an {@code int} value with a single one-bit, in the position
* of the lowest-order one-bit in the specified value, or zero if * of the lowest-order one-bit in the specified value, or zero if
* the specified value is itself equal to zero. * the specified value is itself equal to zero.
...@@ -1382,6 +1385,7 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1382,6 +1385,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* <li>ceil(log<sub>2</sub>(x)) = {@code 32 - numberOfLeadingZeros(x - 1)} * <li>ceil(log<sub>2</sub>(x)) = {@code 32 - numberOfLeadingZeros(x - 1)}
* </ul> * </ul>
* *
* @param i the value whose number of leading zeros is to be computed
* @return the number of zero bits preceding the highest-order * @return the number of zero bits preceding the highest-order
* ("leftmost") one-bit in the two's complement binary representation * ("leftmost") one-bit in the two's complement binary representation
* of the specified {@code int} value, or 32 if the value * of the specified {@code int} value, or 32 if the value
...@@ -1408,6 +1412,7 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1408,6 +1412,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* one-bits in its two's complement representation, in other words if it is * one-bits in its two's complement representation, in other words if it is
* equal to zero. * equal to zero.
* *
* @param i the value whose number of trailing zeros is to be computed
* @return the number of zero bits following the lowest-order ("rightmost") * @return the number of zero bits following the lowest-order ("rightmost")
* one-bit in the two's complement binary representation of the * one-bit in the two's complement binary representation of the
* specified {@code int} value, or 32 if the value is equal * specified {@code int} value, or 32 if the value is equal
...@@ -1431,6 +1436,7 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1431,6 +1436,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* representation of the specified {@code int} value. This function is * representation of the specified {@code int} value. This function is
* sometimes referred to as the <i>population count</i>. * sometimes referred to as the <i>population count</i>.
* *
* @param i the value whose bits are to be counted
* @return the number of one-bits in the two's complement binary * @return the number of one-bits in the two's complement binary
* representation of the specified {@code int} value. * representation of the specified {@code int} value.
* @since 1.5 * @since 1.5
...@@ -1458,6 +1464,8 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1458,6 +1464,8 @@ public final class Integer extends Number implements Comparable<Integer> {
* ignored, even if the distance is negative: {@code rotateLeft(val, * ignored, even if the distance is negative: {@code rotateLeft(val,
* distance) == rotateLeft(val, distance & 0x1F)}. * distance) == rotateLeft(val, distance & 0x1F)}.
* *
* @param i the value whose bits are to be rotated left
* @param distance the number of bit positions to rotate left
* @return the value obtained by rotating the two's complement binary * @return the value obtained by rotating the two's complement binary
* representation of the specified {@code int} value left by the * representation of the specified {@code int} value left by the
* specified number of bits. * specified number of bits.
...@@ -1480,6 +1488,8 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1480,6 +1488,8 @@ public final class Integer extends Number implements Comparable<Integer> {
* ignored, even if the distance is negative: {@code rotateRight(val, * ignored, even if the distance is negative: {@code rotateRight(val,
* distance) == rotateRight(val, distance & 0x1F)}. * distance) == rotateRight(val, distance & 0x1F)}.
* *
* @param i the value whose bits are to be rotated right
* @param distance the number of bit positions to rotate right
* @return the value obtained by rotating the two's complement binary * @return the value obtained by rotating the two's complement binary
* representation of the specified {@code int} value right by the * representation of the specified {@code int} value right by the
* specified number of bits. * specified number of bits.
...@@ -1494,6 +1504,7 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1494,6 +1504,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* two's complement binary representation of the specified {@code int} * two's complement binary representation of the specified {@code int}
* value. * value.
* *
* @param i the value to be reversed
* @return the value obtained by reversing order of the bits in the * @return the value obtained by reversing order of the bits in the
* specified {@code int} value. * specified {@code int} value.
* @since 1.5 * @since 1.5
...@@ -1513,6 +1524,7 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1513,6 +1524,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* return value is -1 if the specified value is negative; 0 if the * return value is -1 if the specified value is negative; 0 if the
* specified value is zero; and 1 if the specified value is positive.) * specified value is zero; and 1 if the specified value is positive.)
* *
* @param i the value whose signum is to be computed
* @return the signum function of the specified {@code int} value. * @return the signum function of the specified {@code int} value.
* @since 1.5 * @since 1.5
*/ */
...@@ -1525,6 +1537,7 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1525,6 +1537,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* Returns the value obtained by reversing the order of the bytes in the * Returns the value obtained by reversing the order of the bytes in the
* two's complement representation of the specified {@code int} value. * two's complement representation of the specified {@code int} value.
* *
* @param i the value whose bytes are to be reversed
* @return the value obtained by reversing the bytes in the specified * @return the value obtained by reversing the bytes in the specified
* {@code int} value. * {@code int} value.
* @since 1.5 * @since 1.5
......
...@@ -1053,9 +1053,9 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1053,9 +1053,9 @@ public final class Long extends Number implements Comparable<Long> {
* Returns a hash code for a {@code long} value; compatible with * Returns a hash code for a {@code long} value; compatible with
* {@code Long.hashCode()}. * {@code Long.hashCode()}.
* *
* @since 1.8 * @param value the value to hash
*
* @return a hash code value for a {@code long} value. * @return a hash code value for a {@code long} value.
* @since 1.8
*/ */
public static int hashCode(long value) { public static int hashCode(long value) {
return (int)(value ^ (value >>> 32)); return (int)(value ^ (value >>> 32));
...@@ -1357,6 +1357,7 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1357,6 +1357,7 @@ public final class Long extends Number implements Comparable<Long> {
* one-bits in its two's complement binary representation, that is, if it * one-bits in its two's complement binary representation, that is, if it
* is equal to zero. * is equal to zero.
* *
* @param i the value whose highest one bit is to be computed
* @return a {@code long} value with a single one-bit, in the position * @return a {@code long} value with a single one-bit, in the position
* of the highest-order one-bit in the specified value, or zero if * of the highest-order one-bit in the specified value, or zero if
* the specified value is itself equal to zero. * the specified value is itself equal to zero.
...@@ -1380,6 +1381,7 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1380,6 +1381,7 @@ public final class Long extends Number implements Comparable<Long> {
* one-bits in its two's complement binary representation, that is, if it * one-bits in its two's complement binary representation, that is, if it
* is equal to zero. * is equal to zero.
* *
* @param i the value whose lowest one bit is to be computed
* @return a {@code long} value with a single one-bit, in the position * @return a {@code long} value with a single one-bit, in the position
* of the lowest-order one-bit in the specified value, or zero if * of the lowest-order one-bit in the specified value, or zero if
* the specified value is itself equal to zero. * the specified value is itself equal to zero.
...@@ -1404,6 +1406,7 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1404,6 +1406,7 @@ public final class Long extends Number implements Comparable<Long> {
* <li>ceil(log<sub>2</sub>(x)) = {@code 64 - numberOfLeadingZeros(x - 1)} * <li>ceil(log<sub>2</sub>(x)) = {@code 64 - numberOfLeadingZeros(x - 1)}
* </ul> * </ul>
* *
* @param i the value whose number of leading zeros is to be computed
* @return the number of zero bits preceding the highest-order * @return the number of zero bits preceding the highest-order
* ("leftmost") one-bit in the two's complement binary representation * ("leftmost") one-bit in the two's complement binary representation
* of the specified {@code long} value, or 64 if the value * of the specified {@code long} value, or 64 if the value
...@@ -1432,6 +1435,7 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1432,6 +1435,7 @@ public final class Long extends Number implements Comparable<Long> {
* one-bits in its two's complement representation, in other words if it is * one-bits in its two's complement representation, in other words if it is
* equal to zero. * equal to zero.
* *
* @param i the value whose number of trailing zeros is to be computed
* @return the number of zero bits following the lowest-order ("rightmost") * @return the number of zero bits following the lowest-order ("rightmost")
* one-bit in the two's complement binary representation of the * one-bit in the two's complement binary representation of the
* specified {@code long} value, or 64 if the value is equal * specified {@code long} value, or 64 if the value is equal
...@@ -1456,6 +1460,7 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1456,6 +1460,7 @@ public final class Long extends Number implements Comparable<Long> {
* representation of the specified {@code long} value. This function is * representation of the specified {@code long} value. This function is
* sometimes referred to as the <i>population count</i>. * sometimes referred to as the <i>population count</i>.
* *
* @param i the value whose bits are to be counted
* @return the number of one-bits in the two's complement binary * @return the number of one-bits in the two's complement binary
* representation of the specified {@code long} value. * representation of the specified {@code long} value.
* @since 1.5 * @since 1.5
...@@ -1484,6 +1489,8 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1484,6 +1489,8 @@ public final class Long extends Number implements Comparable<Long> {
* ignored, even if the distance is negative: {@code rotateLeft(val, * ignored, even if the distance is negative: {@code rotateLeft(val,
* distance) == rotateLeft(val, distance & 0x3F)}. * distance) == rotateLeft(val, distance & 0x3F)}.
* *
* @param i the value whose bits are to be rotated left
* @param distance the number of bit positions to rotate left
* @return the value obtained by rotating the two's complement binary * @return the value obtained by rotating the two's complement binary
* representation of the specified {@code long} value left by the * representation of the specified {@code long} value left by the
* specified number of bits. * specified number of bits.
...@@ -1506,6 +1513,8 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1506,6 +1513,8 @@ public final class Long extends Number implements Comparable<Long> {
* ignored, even if the distance is negative: {@code rotateRight(val, * ignored, even if the distance is negative: {@code rotateRight(val,
* distance) == rotateRight(val, distance & 0x3F)}. * distance) == rotateRight(val, distance & 0x3F)}.
* *
* @param i the value whose bits are to be rotated right
* @param distance the number of bit positions to rotate right
* @return the value obtained by rotating the two's complement binary * @return the value obtained by rotating the two's complement binary
* representation of the specified {@code long} value right by the * representation of the specified {@code long} value right by the
* specified number of bits. * specified number of bits.
...@@ -1520,6 +1529,7 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1520,6 +1529,7 @@ public final class Long extends Number implements Comparable<Long> {
* two's complement binary representation of the specified {@code long} * two's complement binary representation of the specified {@code long}
* value. * value.
* *
* @param i the value to be reversed
* @return the value obtained by reversing order of the bits in the * @return the value obtained by reversing order of the bits in the
* specified {@code long} value. * specified {@code long} value.
* @since 1.5 * @since 1.5
...@@ -1540,6 +1550,7 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1540,6 +1550,7 @@ public final class Long extends Number implements Comparable<Long> {
* return value is -1 if the specified value is negative; 0 if the * return value is -1 if the specified value is negative; 0 if the
* specified value is zero; and 1 if the specified value is positive.) * specified value is zero; and 1 if the specified value is positive.)
* *
* @param i the value whose signum is to be computed
* @return the signum function of the specified {@code long} value. * @return the signum function of the specified {@code long} value.
* @since 1.5 * @since 1.5
*/ */
...@@ -1552,6 +1563,7 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1552,6 +1563,7 @@ public final class Long extends Number implements Comparable<Long> {
* Returns the value obtained by reversing the order of the bytes in the * Returns the value obtained by reversing the order of the bytes in the
* two's complement representation of the specified {@code long} value. * two's complement representation of the specified {@code long} value.
* *
* @param i the value whose bytes are to be reversed
* @return the value obtained by reversing the bytes in the specified * @return the value obtained by reversing the bytes in the specified
* {@code long} value. * {@code long} value.
* @since 1.5 * @since 1.5
......
...@@ -77,18 +77,18 @@ import java.lang.annotation.Annotation; ...@@ -77,18 +77,18 @@ import java.lang.annotation.Annotation;
* by the following formal grammar: * by the following formal grammar:
* <blockquote> * <blockquote>
* <dl> * <dl>
* <dt><i>SpecificationVersion: * <dt><i>SpecificationVersion:</i>
* <dd>Digits RefinedVersion<sub>opt</sub></i> * <dd><i>Digits RefinedVersion<sub>opt</sub></i>
* <p><dt><i>RefinedVersion:</i> * <dt><i>RefinedVersion:</i>
* <dd>{@code .} <i>Digits</i> * <dd>{@code .} <i>Digits</i>
* <dd>{@code .} <i>Digits RefinedVersion</i> * <dd>{@code .} <i>Digits RefinedVersion</i>
* *
* <p><dt><i>Digits: * <dt><i>Digits:</i>
* <dd>Digit * <dd><i>Digit</i>
* <dd>Digits</i> * <dd><i>Digits</i>
* *
* <p><dt><i>Digit:</i> * <dt><i>Digit:</i>
* <dd>any character for which {@link Character#isDigit} returns {@code true}, * <dd>any character for which {@link Character#isDigit} returns {@code true},
* e.g. 0, 1, 2, ... * e.g. 0, 1, 2, ...
* </dl> * </dl>
......
...@@ -117,11 +117,11 @@ public class Runtime { ...@@ -117,11 +117,11 @@ public class Runtime {
* *
* <ul> * <ul>
* *
* <p> <li> The program <i>exits</i> normally, when the last non-daemon * <li> The program <i>exits</i> normally, when the last non-daemon
* thread exits or when the <tt>{@link #exit exit}</tt> (equivalently, * thread exits or when the <tt>{@link #exit exit}</tt> (equivalently,
* <tt>{@link System#exit(int) System.exit}</tt>) method is invoked, or * {@link System#exit(int) System.exit}) method is invoked, or
* *
* <p> <li> The virtual machine is <i>terminated</i> in response to a * <li> The virtual machine is <i>terminated</i> in response to a
* user interrupt, such as typing <tt>^C</tt>, or a system-wide event, * user interrupt, such as typing <tt>^C</tt>, or a system-wide event,
* such as user logoff or system shutdown. * such as user logoff or system shutdown.
* *
......
/* /*
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2013, 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
...@@ -403,9 +403,9 @@ public final class Short extends Number implements Comparable<Short> { ...@@ -403,9 +403,9 @@ public final class Short extends Number implements Comparable<Short> {
* Returns a hash code for a {@code short} value; compatible with * Returns a hash code for a {@code short} value; compatible with
* {@code Short.hashCode()}. * {@code Short.hashCode()}.
* *
* @since 1.8 * @param value the value to hash
*
* @return a hash code value for a {@code short} value. * @return a hash code value for a {@code short} value.
* @since 1.8
*/ */
public static int hashCode(short value) { public static int hashCode(short value) {
return (int)value; return (int)value;
...@@ -482,6 +482,7 @@ public final class Short extends Number implements Comparable<Short> { ...@@ -482,6 +482,7 @@ public final class Short extends Number implements Comparable<Short> {
* Returns the value obtained by reversing the order of the bytes in the * Returns the value obtained by reversing the order of the bytes in the
* two's complement representation of the specified {@code short} value. * two's complement representation of the specified {@code short} value.
* *
* @param i the value whose bytes are to be reversed
* @return the value obtained by reversing (or, equivalently, swapping) * @return the value obtained by reversing (or, equivalently, swapping)
* the bytes in the specified {@code short} value. * the bytes in the specified {@code short} value.
* @since 1.5 * @since 1.5
......
/* /*
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2013, 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
...@@ -1419,6 +1419,7 @@ public final class StrictMath { ...@@ -1419,6 +1419,7 @@ public final class StrictMath {
* {@link Float#MIN_EXPONENT} -1. * {@link Float#MIN_EXPONENT} -1.
* </ul> * </ul>
* @param f a {@code float} value * @param f a {@code float} value
* @return the unbiased exponent of the argument
* @since 1.6 * @since 1.6
*/ */
public static int getExponent(float f) { public static int getExponent(float f) {
...@@ -1436,6 +1437,7 @@ public final class StrictMath { ...@@ -1436,6 +1437,7 @@ public final class StrictMath {
* {@link Double#MIN_EXPONENT} -1. * {@link Double#MIN_EXPONENT} -1.
* </ul> * </ul>
* @param d a {@code double} value * @param d a {@code double} value
* @return the unbiased exponent of the argument
* @since 1.6 * @since 1.6
*/ */
public static int getExponent(double d) { public static int getExponent(double d) {
......
...@@ -66,6 +66,7 @@ public @interface SuppressWarnings { ...@@ -66,6 +66,7 @@ public @interface SuppressWarnings {
* additional warning names they support in conjunction with this * additional warning names they support in conjunction with this
* annotation type. They are encouraged to cooperate to ensure * annotation type. They are encouraged to cooperate to ensure
* that the same names work across multiple compilers. * that the same names work across multiple compilers.
* @return the set of warnings to be suppressed
*/ */
String[] value(); String[] value();
} }
...@@ -634,6 +634,8 @@ public final class System { ...@@ -634,6 +634,8 @@ public final class System {
* *
* <p>On UNIX systems, it returns {@code "\n"}; on Microsoft * <p>On UNIX systems, it returns {@code "\n"}; on Microsoft
* Windows systems it returns {@code "\r\n"}. * Windows systems it returns {@code "\r\n"}.
*
* @return the system-dependent line separator string
* @since 1.7 * @since 1.7
*/ */
public static String lineSeparator() { public static String lineSeparator() {
......
/* /*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, 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,6 +126,7 @@ public interface Annotation { ...@@ -126,6 +126,7 @@ public interface Annotation {
/** /**
* Returns the annotation type of this annotation. * Returns the annotation type of this annotation.
* @return the annotation type of this annotation
*/ */
Class<? extends Annotation> annotationType(); Class<? extends Annotation> annotationType();
} }
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, 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
...@@ -43,6 +43,7 @@ public @interface Repeatable { ...@@ -43,6 +43,7 @@ public @interface Repeatable {
/** /**
* Indicates the <em>containing annotation type</em> for the * Indicates the <em>containing annotation type</em> for the
* repeatable annotation type. * repeatable annotation type.
* @return the containing annotation type
*/ */
Class<? extends Annotation> value(); Class<? extends Annotation> value();
} }
...@@ -44,5 +44,9 @@ package java.lang.annotation; ...@@ -44,5 +44,9 @@ package java.lang.annotation;
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE) @Target(ElementType.ANNOTATION_TYPE)
public @interface Retention { public @interface Retention {
/**
* Returns the retention policy.
* @return the retention policy
*/
RetentionPolicy value(); RetentionPolicy value();
} }
...@@ -67,5 +67,11 @@ package java.lang.annotation; ...@@ -67,5 +67,11 @@ package java.lang.annotation;
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE) @Target(ElementType.ANNOTATION_TYPE)
public @interface Target { public @interface Target {
/**
* Returns an array of the kinds of elements an annotation type
* can be applied to.
* @return an array of the kinds of elements an annotation type
* can be applied to
*/
ElementType[] value(); ElementType[] value();
} }
...@@ -130,6 +130,7 @@ public interface AnnotatedElement { ...@@ -130,6 +130,7 @@ public interface AnnotatedElement {
* Returns this element's annotation for the specified type if * Returns this element's annotation for the specified type if
* such an annotation is present, else null. * such an annotation is present, else null.
* *
* @param <T> the type of the annotation to query for and return if present
* @param annotationClass the Class object corresponding to the * @param annotationClass the Class object corresponding to the
* annotation type * annotation type
* @return this element's annotation for the specified annotation type if * @return this element's annotation for the specified annotation type if
...@@ -154,6 +155,7 @@ public interface AnnotatedElement { ...@@ -154,6 +155,7 @@ public interface AnnotatedElement {
* The caller of this method is free to modify the returned array; it will * The caller of this method is free to modify the returned array; it will
* have no effect on the arrays returned to other callers. * have no effect on the arrays returned to other callers.
* *
* @param <T> the type of the annotation to query for and return if present
* @param annotationClass the Class object corresponding to the * @param annotationClass the Class object corresponding to the
* annotation type * annotation type
* @return all this element's annotations for the specified annotation type if * @return all this element's annotations for the specified annotation type if
...@@ -184,6 +186,7 @@ public interface AnnotatedElement { ...@@ -184,6 +186,7 @@ public interface AnnotatedElement {
* This method ignores inherited annotations. (Returns null if no * This method ignores inherited annotations. (Returns null if no
* annotations are directly present on this element.) * annotations are directly present on this element.)
* *
* @param <T> the type of the annotation to query for and return if present
* @param annotationClass the Class object corresponding to the * @param annotationClass the Class object corresponding to the
* annotation type * annotation type
* @return this element's annotation for the specified annotation type if * @return this element's annotation for the specified annotation type if
...@@ -209,6 +212,8 @@ public interface AnnotatedElement { ...@@ -209,6 +212,8 @@ public interface AnnotatedElement {
* The caller of this method is free to modify the returned array; it will * The caller of this method is free to modify the returned array; it will
* have no effect on the arrays returned to other callers. * have no effect on the arrays returned to other callers.
* *
* @param <T> the type of the annotation to query for and return
* if directly present
* @param annotationClass the Class object corresponding to the * @param annotationClass the Class object corresponding to the
* annotation type * annotation type
* @return all this element's annotations for the specified annotation type if * @return all this element's annotations for the specified annotation type if
......
...@@ -384,6 +384,8 @@ public abstract class Executable extends AccessibleObject ...@@ -384,6 +384,8 @@ public abstract class Executable extends AccessibleObject
/** /**
* Returns a string describing this {@code Executable}, including * Returns a string describing this {@code Executable}, including
* any type parameters. * any type parameters.
* @return a string describing this {@code Executable}, including
* any type parameters
*/ */
public abstract String toGenericString(); public abstract String toGenericString();
...@@ -496,6 +498,8 @@ public abstract class Executable extends AccessibleObject ...@@ -496,6 +498,8 @@ public abstract class Executable extends AccessibleObject
* If this Executable represents a method, the AnnotatedType object * If this Executable represents a method, the AnnotatedType object
* represents the use of a type to specify the return type of the method. * represents the use of a type to specify the return type of the method.
* *
* @return an object representing the return type of this method
* or constructor
* @since 1.8 * @since 1.8
*/ */
public abstract AnnotatedType getAnnotatedReturnType(); public abstract AnnotatedType getAnnotatedReturnType();
...@@ -531,6 +535,9 @@ public abstract class Executable extends AccessibleObject ...@@ -531,6 +535,9 @@ public abstract class Executable extends AccessibleObject
* *
* Returns null if this Executable represents a static method. * Returns null if this Executable represents a static method.
* *
* @return an object representing the receiver type of the
* method or constructor represented by this Executable
*
* @since 1.8 * @since 1.8
*/ */
public AnnotatedType getAnnotatedReceiverType() { public AnnotatedType getAnnotatedReceiverType() {
...@@ -553,6 +560,9 @@ public abstract class Executable extends AccessibleObject ...@@ -553,6 +560,9 @@ public abstract class Executable extends AccessibleObject
* Returns an array of length 0 if the method/constructor declares no * Returns an array of length 0 if the method/constructor declares no
* parameters. * parameters.
* *
* @return an array of objects representing the types of the
* formal parameters of this method or constructor
*
* @since 1.8 * @since 1.8
*/ */
public AnnotatedType[] getAnnotatedParameterTypes() { public AnnotatedType[] getAnnotatedParameterTypes() {
...@@ -575,6 +585,9 @@ public abstract class Executable extends AccessibleObject ...@@ -575,6 +585,9 @@ public abstract class Executable extends AccessibleObject
* Returns an array of length 0 if the method/constructor declares no * Returns an array of length 0 if the method/constructor declares no
* exceptions. * exceptions.
* *
* @return an array of objects representing the declared
* exceptions of this method or constructor
*
* @since 1.8 * @since 1.8
*/ */
public AnnotatedType[] getAnnotatedExceptionTypes() { public AnnotatedType[] getAnnotatedExceptionTypes() {
......
...@@ -1151,6 +1151,8 @@ class Field extends AccessibleObject implements Member { ...@@ -1151,6 +1151,8 @@ class Field extends AccessibleObject implements Member {
/** /**
* Returns an AnnotatedType object that represents the use of a type to specify * Returns an AnnotatedType object that represents the use of a type to specify
* the declared type of the field represented by this Field. * the declared type of the field represented by this Field.
* @return an object representing the declared type of the field
* represented by this Field
* *
* @since 1.8 * @since 1.8
*/ */
......
...@@ -152,6 +152,8 @@ public final class Parameter implements AnnotatedElement { ...@@ -152,6 +152,8 @@ public final class Parameter implements AnnotatedElement {
* defined in a class file, then that name will be returned by * defined in a class file, then that name will be returned by
* this method. Otherwise, this method will synthesize a name of * this method. Otherwise, this method will synthesize a name of
* the form argN, where N is the index of the parameter. * the form argN, where N is the index of the parameter.
*
* @return the name of the parameter
*/ */
public String getName() { public String getName() {
// Note: empty strings as paramete names are now outlawed. // Note: empty strings as paramete names are now outlawed.
......
...@@ -95,6 +95,7 @@ public interface TypeVariable<D extends GenericDeclaration> extends Type, Annota ...@@ -95,6 +95,7 @@ public interface TypeVariable<D extends GenericDeclaration> extends Type, Annota
* *
* Returns an array of length 0 if the type parameter declares no bounds. * Returns an array of length 0 if the type parameter declares no bounds.
* *
* @return an array of objects representing the upper bounds of the type variable
* @since 1.8 * @since 1.8
*/ */
AnnotatedType[] getAnnotatedBounds(); AnnotatedType[] getAnnotatedBounds();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册