summaryrefslogtreecommitdiff
path: root/java/lang
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-04-17 17:08:22 +0000
committerMichael Koch <konqueror@gmx.de>2004-04-17 17:08:22 +0000
commit5b1502bc9a65bb8355595bb51235ca09eb569c08 (patch)
tree2ac1f28091f8f253dd8774bbc289d3f51d744f8f /java/lang
parentdeb74aa4777d3e58a9a7c8a3ac42ff67d3084dc7 (diff)
downloadclasspath-5b1502bc9a65bb8355595bb51235ca09eb569c08.tar.gz
2004-04-17 Michael Koch <konqueror@gmx.de>
* java/lang/Byte.java (parseByte): Fixed <code> tag in javadoc. * java/lang/CharSequence.java (subSequence): Likewise. * java/lang/Class.java (forName): Added @return tag. (getConstructor): Fixed argument name. (getDeclaredConstructor): Likewise. (getDeclaredMethod): Fixed argument name and HTML tag in javadoc. (getMethod): Likewise. (getName): Added missing </pre> tag. * java/lang/ClassLoader.java (getParent): Added @return tag. * java/lang/Double.java (parseDouble): Fixed argument name. * java/lang/Float.java (parseFloat): Likewise. * java/lang/Integer.java (parseInt): Fixed javadoc. (getInteger): Likewise. (decode): Likewise. * java/lang/Long.java (parseLong): Likewise. (decode): Likewise. (getLong): Likewise. * java/lang/Number.java (digits): Added comma to array definition. * java/lang/Object.java (equals): Fixed HTML tag. * java/lang/Package.java (isCompatibleWith): Added @return tag. * java/lang/Runtime.java (loadLibrary): Fixed @param tag. * java/lang/SecurityManager.java: Fixed javadocs all over. * java/lang/String.java (regionMatches): Fixed @param tag. (startsWith): Likewise. (substring): Likewise. * java/lang/StringBuffer.java (append): Likewise. * java/lang/ThreadGroup.java (parentOf): Use group as argument name. (uncaughtException): Fixed @param tag. * java/lang/Throwable.java (printStackTrace): Likewise.
Diffstat (limited to 'java/lang')
-rw-r--r--java/lang/Byte.java2
-rw-r--r--java/lang/CharSequence.java2
-rw-r--r--java/lang/Class.java28
-rw-r--r--java/lang/ClassLoader.java1
-rw-r--r--java/lang/Double.java2
-rw-r--r--java/lang/Float.java4
-rw-r--r--java/lang/Integer.java8
-rw-r--r--java/lang/Long.java6
-rw-r--r--java/lang/Number.java2
-rw-r--r--java/lang/Object.java2
-rw-r--r--java/lang/Package.java5
-rw-r--r--java/lang/Runtime.java4
-rw-r--r--java/lang/SecurityManager.java35
-rw-r--r--java/lang/String.java10
-rw-r--r--java/lang/StringBuffer.java2
-rw-r--r--java/lang/ThreadGroup.java12
-rw-r--r--java/lang/Throwable.java2
17 files changed, 74 insertions, 53 deletions
diff --git a/java/lang/Byte.java b/java/lang/Byte.java
index 7605ad70e..641c5cc8e 100644
--- a/java/lang/Byte.java
+++ b/java/lang/Byte.java
@@ -147,7 +147,7 @@ public final class Byte extends Number implements Comparable
*
* @param s the <code>String</code> to convert
* @param radix the radix (base) to use in the conversion
- * @return the <code>String</code> argument converted to </code>byte</code>
+ * @return the <code>String</code> argument converted to <code>byte</code>
* @throws NumberFormatException if <code>s</code> cannot be parsed as a
* <code>byte</code>
*/
diff --git a/java/lang/CharSequence.java b/java/lang/CharSequence.java
index d46bd9d38..5f5147b0b 100644
--- a/java/lang/CharSequence.java
+++ b/java/lang/CharSequence.java
@@ -78,7 +78,7 @@ public interface CharSequence
int length();
/**
- * Returns a new <code>CharSequence</char> of the indicated range.
+ * Returns a new <code>CharSequence</code> of the indicated range.
*
* @param begin the start index (inclusive)
* @param end the end index (exclusive)
diff --git a/java/lang/Class.java b/java/lang/Class.java
index c942fbdc0..a3b30a991 100644
--- a/java/lang/Class.java
+++ b/java/lang/Class.java
@@ -154,6 +154,9 @@ public final class Class implements Serializable
* @param initialize whether or not to initialize the class at this time
* @param classloader the classloader to use to find the class; null means
* to use the bootstrap class loader
+ *
+ * @return the class object for the given class
+ *
* @throws ClassNotFoundException if the class was not found by the
* classloader
* @throws LinkageError if linking the class fails
@@ -296,14 +299,14 @@ public final class Class implements Serializable
* @see #getConstructors()
* @since 1.1
*/
- public Constructor getConstructor(Class[] args) throws NoSuchMethodException
+ public Constructor getConstructor(Class[] types) throws NoSuchMethodException
{
memberAccessCheck(Member.PUBLIC);
Constructor[] constructors = getDeclaredConstructors(true);
for (int i = 0; i < constructors.length; i++)
{
Constructor constructor = constructors[i];
- if (matchParameters(args, constructor.getParameterTypes()))
+ if (matchParameters(types, constructor.getParameterTypes()))
return constructor;
}
throw new NoSuchMethodException();
@@ -341,7 +344,7 @@ public final class Class implements Serializable
* @see #getDeclaredConstructors()
* @since 1.1
*/
- public Constructor getDeclaredConstructor(Class[] args)
+ public Constructor getDeclaredConstructor(Class[] types)
throws NoSuchMethodException
{
memberAccessCheck(Member.DECLARED);
@@ -349,7 +352,7 @@ public final class Class implements Serializable
for (int i = 0; i < constructors.length; i++)
{
Constructor constructor = constructors[i];
- if (matchParameters(args, constructor.getParameterTypes()))
+ if (matchParameters(types, constructor.getParameterTypes()))
return constructor;
}
throw new NoSuchMethodException();
@@ -452,8 +455,8 @@ public final class Class implements Serializable
/**
* Get a method declared in this class, where name is its simple name. The
* implicit methods of Object are not available from arrays or interfaces.
- * Constructors (named "<init>" in the class file) and class initializers
- * (name "<clinit>") are not available. The Virtual Machine allows
+ * Constructors (named "&lt;init&gt;" in the class file) and class initializers
+ * (name "&lt;clinit&gt;") are not available. The Virtual Machine allows
* multiple methods with the same signature but differing return types; in
* such a case the most specific return types are favored, then the final
* choice is arbitrary. If the method takes no argument, an array of zero
@@ -470,11 +473,11 @@ public final class Class implements Serializable
* @see #getDeclaredMethods()
* @since 1.1
*/
- public Method getDeclaredMethod(String methodName, Class[] args)
+ public Method getDeclaredMethod(String methodName, Class[] types)
throws NoSuchMethodException
{
memberAccessCheck(Member.DECLARED);
- Method match = matchMethod(getDeclaredMethods(false), methodName, args);
+ Method match = matchMethod(getDeclaredMethods(false), methodName, types);
if (match == null)
throw new NoSuchMethodException(methodName);
return match;
@@ -656,8 +659,8 @@ public final class Class implements Serializable
/**
* Get a public method declared or inherited in this class, where name is
* its simple name. The implicit methods of Object are not available from
- * interfaces. Constructors (named "<init>" in the class file) and class
- * initializers (name "<clinit>") are not available. The Virtual
+ * interfaces. Constructors (named "&lt;init&gt;" in the class file) and class
+ * initializers (name "&lt;clinit&gt;") are not available. The Virtual
* Machine allows multiple methods with the same signature but differing
* return types, and the class can inherit multiple methods of the same
* return type; in such a case the most specific return types are favored,
@@ -675,11 +678,11 @@ public final class Class implements Serializable
* @see #getMethods()
* @since 1.1
*/
- public Method getMethod(String methodName, Class[] args)
+ public Method getMethod(String methodName, Class[] types)
throws NoSuchMethodException
{
memberAccessCheck(Member.PUBLIC);
- Method method = internalGetMethod(methodName, args);
+ Method method = internalGetMethod(methodName, types);
if (method == null)
throw new NoSuchMethodException(methodName);
return method;
@@ -853,6 +856,7 @@ public final class Class implements Serializable
* array type [<em>element type</em>
* class or interface, alone: &lt;dotted name&gt;
* class or interface, as element type: L&lt;dotted name&gt;;
+ * </pre>
*
* @return the name of this class
*/
diff --git a/java/lang/ClassLoader.java b/java/lang/ClassLoader.java
index ca9099ec8..2b30b1b8a 100644
--- a/java/lang/ClassLoader.java
+++ b/java/lang/ClassLoader.java
@@ -475,6 +475,7 @@ public abstract class ClassLoader
* <code>null</code>. A security check may be performed on
* <code>RuntimePermission("getClassLoader")</code>.
*
+ * @return the parent <code>ClassLoader</code>
* @throws SecurityException if the security check fails
* @since 1.2
*/
diff --git a/java/lang/Double.java b/java/lang/Double.java
index 2c9588358..91d4bcdd5 100644
--- a/java/lang/Double.java
+++ b/java/lang/Double.java
@@ -243,7 +243,7 @@ public final class Double extends Number implements Comparable
* @see #NEGATIVE_INFINITY
* @since 1.2
*/
- public static native double parseDouble(String s);
+ public static native double parseDouble(String str);
/**
* Return <code>true</code> if the <code>double</code> has the same
diff --git a/java/lang/Float.java b/java/lang/Float.java
index b6c12fe58..69476cd5b 100644
--- a/java/lang/Float.java
+++ b/java/lang/Float.java
@@ -240,11 +240,11 @@ public final class Float extends Number implements Comparable
* @see #NEGATIVE_INFINITY
* @since 1.2
*/
- public static float parseFloat(String s)
+ public static float parseFloat(String str)
{
// XXX Rounding parseDouble() causes some errors greater than 1 ulp from
// the infinitely precise decimal.
- return (float) Double.parseDouble(s);
+ return (float) Double.parseDouble(str);
}
/**
diff --git a/java/lang/Integer.java b/java/lang/Integer.java
index f9d901804..9c8329dbd 100644
--- a/java/lang/Integer.java
+++ b/java/lang/Integer.java
@@ -220,9 +220,9 @@ public final class Integer extends Number implements Comparable
* within <code>MIN_VALUE</code> to <code>MAX_VALUE</code>, inclusive.
* Unlike Double.parseDouble, you may not have a leading '+'.
*
- * @param s the <code>String</code> to convert
+ * @param str the <code>String</code> to convert
* @param radix the radix (base) to use in the conversion
- * @return the <code>String</code> argument converted to </code>int</code>
+ * @return the <code>String</code> argument converted to <code>int</code>
* @throws NumberFormatException if <code>s</code> cannot be parsed as an
* <code>int</code>
*/
@@ -414,7 +414,7 @@ public final class Integer extends Number implements Comparable
* interpret the value of the property.
*
* @param nm the name of the system property
- * @param val the default value
+ * @param def the default value
* @return the value of the system property, or the default
* @throws SecurityException if accessing the system property is forbidden
* @see System#getProperty(String)
@@ -461,7 +461,7 @@ public final class Integer extends Number implements Comparable
* Finally, the value must be in the range <code>MIN_VALUE</code> to
* <code>MAX_VALUE</code>, or an exception is thrown.
*
- * @param s the <code>String</code> to interpret
+ * @param str the <code>String</code> to interpret
* @return the value of the String as an <code>Integer</code>
* @throws NumberFormatException if <code>s</code> cannot be parsed as a
* <code>int</code>
diff --git a/java/lang/Long.java b/java/lang/Long.java
index b8403ec1e..012cc9c93 100644
--- a/java/lang/Long.java
+++ b/java/lang/Long.java
@@ -223,7 +223,7 @@ public final class Long extends Number implements Comparable
* 'L' as the last character is only valid in radices 22 or greater, where
* it is a digit and not a type indicator.
*
- * @param s the <code>String</code> to convert
+ * @param str the <code>String</code> to convert
* @param radix the radix (base) to use in the conversion
* @return the <code>String</code> argument converted to <code>long</code>
* @throws NumberFormatException if <code>s</code> cannot be parsed as a
@@ -306,7 +306,7 @@ public final class Long extends Number implements Comparable
* <code>MAX_VALUE</code>, or an exception is thrown. Note that you cannot
* use a trailing 'l' or 'L', unlike in Java source code.
*
- * @param s the <code>String</code> to interpret
+ * @param str the <code>String</code> to interpret
* @return the value of the String as a <code>Long</code>
* @throws NumberFormatException if <code>s</code> cannot be parsed as a
* <code>long</code>
@@ -455,7 +455,7 @@ public final class Long extends Number implements Comparable
* interpret the value of the property.
*
* @param nm the name of the system property
- * @param val the default value
+ * @param def the default value
* @return the value of the system property, or the default
* @throws SecurityException if accessing the system property is forbidden
* @see System#getProperty(String)
diff --git a/java/lang/Number.java b/java/lang/Number.java
index eb230b060..54bb1f763 100644
--- a/java/lang/Number.java
+++ b/java/lang/Number.java
@@ -69,7 +69,7 @@ public abstract class Number implements Serializable
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
- 'u', 'v', 'w', 'x', 'y', 'z'
+ 'u', 'v', 'w', 'x', 'y', 'z',
};
/**
diff --git a/java/lang/Object.java b/java/lang/Object.java
index 8d003ae84..2e1d2a479 100644
--- a/java/lang/Object.java
+++ b/java/lang/Object.java
@@ -113,7 +113,7 @@ public class Object
* returned on all later invocations.</li>
* <li><code>a.equals(null)</code> must be false.</li>
* <li>It must be consistent with hashCode(). That is,
- * <code>a.equals(b)<code> must imply
+ * <code>a.equals(b)</code> must imply
* <code>a.hashCode() == b.hashCode()</code>.
* The reverse is not true; two objects that are not
* equal may have the same hashcode, but that has
diff --git a/java/lang/Package.java b/java/lang/Package.java
index 3045b50c2..3ccdbb1e6 100644
--- a/java/lang/Package.java
+++ b/java/lang/Package.java
@@ -227,7 +227,10 @@ public class Package
* <code>getSpecificationVersion</code>.
*
* @param version the (minimal) desired version of the specification
- * @throws NumberFormatException if either version string is invalid
+ *
+ * @return true if the version is compatible, false otherwise
+ *
+ * @Throws NumberFormatException if either version string is invalid
* @throws NullPointerException if either version string is null
*/
public boolean isCompatibleWith(String version)
diff --git a/java/lang/Runtime.java b/java/lang/Runtime.java
index 87a53ec77..5fa366da8 100644
--- a/java/lang/Runtime.java
+++ b/java/lang/Runtime.java
@@ -689,9 +689,11 @@ public class Runtime
* <code>System.mapLibraryName(libname)</code>. There may be a security
* check, of <code>checkLink</code>.
*
- * @param filename the file to load
+ * @param libname the library to load
+ *
* @throws SecurityException if permission is denied
* @throws UnsatisfiedLinkError if the library is not found
+ *
* @see System#mapLibraryName(String)
* @see ClassLoader#findLibrary(String)
*/
diff --git a/java/lang/SecurityManager.java b/java/lang/SecurityManager.java
index 7282da3ee..a59ad86af 100644
--- a/java/lang/SecurityManager.java
+++ b/java/lang/SecurityManager.java
@@ -86,7 +86,7 @@ import java.util.PropertyPermission;
* // now, in worker thread
* if (sm != null)
* sm.checkPermission(permission, context);
- * <pre>
+ * </pre>
*
* <p>Permissions fall into these categories: File, Socket, Net, Security,
* Runtime, Property, AWT, Reflect, and Serializable. Each of these
@@ -174,13 +174,15 @@ public class SecurityManager
* Find the ClassLoader of the first non-system class on the execution
* stack. A non-system class is one whose ClassLoader is not equal to
* {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
- * will return null in three cases:<br><nl>
+ * will return null in three cases:
+ *
+ * <ul>
* <li>All methods on the stack are from system classes</li>
* <li>All methods on the stack up to the first "privileged" caller, as
* created by {@link AccessController.doPrivileged(PrivilegedAction)},
* are from system classes</li>
* <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
- * </nl>
+ * </ul>
*
* @return the most recent non-system ClassLoader on the execution stack
* @deprecated use {@link #checkPermission(Permission)} instead
@@ -194,13 +196,15 @@ public class SecurityManager
* Find the first non-system class on the execution stack. A non-system
* class is one whose ClassLoader is not equal to
* {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
- * will return null in three cases:<br><nl>
+ * will return null in three cases:
+ *
+ * <ul>
* <li>All methods on the stack are from system classes</li>
* <li>All methods on the stack up to the first "privileged" caller, as
* created by {@link AccessController.doPrivileged(PrivilegedAction)},
* are from system classes</li>
* <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
- * </nl>
+ * </ul>
*
* @return the most recent non-system Class on the execution stack
* @deprecated use {@link #checkPermission(Permission)} instead
@@ -231,13 +235,15 @@ public class SecurityManager
* Get the depth on the execution stack of the most recent non-system class.
* A non-system class is one whose ClassLoader is not equal to
* {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
- * will return -1 in three cases:<br><nl>
+ * will return -1 in three cases:
+ *
+ * <ul>
* <li>All methods on the stack are from system classes</li>
* <li>All methods on the stack up to the first "privileged" caller, as
* created by {@link AccessController.doPrivileged(PrivilegedAction)},
* are from system classes</li>
* <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
- * </nl>
+ * </ul>
*
* @return the index of the most recent non-system Class on the stack
* @deprecated use {@link #checkPermission(Permission)} instead
@@ -365,8 +371,8 @@ public class SecurityManager
* Check if the current thread is allowed to modify another Thread. This is
* called by Thread.stop(), suspend(), resume(), interrupt(), destroy(),
* setPriority(), setName(), and setDaemon(). The default implementation
- * checks <code>RuntimePermission("modifyThread") on system threads (ie.
- * threads in ThreadGroup with a null parent), and returns silently on
+ * checks <code>RuntimePermission("modifyThread")</code> on system threads
+ * (ie. threads in ThreadGroup with a null parent), and returns silently on
* other threads.
*
* <p>If you override this, you must do two things. First, call
@@ -398,8 +404,8 @@ public class SecurityManager
* ThreadGroup.ThreadGroup() (to add this ThreadGroup to a parent),
* ThreadGroup.stop(), suspend(), resume(), interrupt(), destroy(),
* setDaemon(), and setMaxPriority(). The default implementation
- * checks <code>RuntimePermission("modifyThread") on the system group (ie.
- * the one with a null parent), and returns silently on other groups.
+ * checks <code>RuntimePermission("modifyThread")</code> on the system group
+ * (ie. the one with a null parent), and returns silently on other groups.
*
* <p>If you override this, you must do two things. First, call
* <code>super.checkAccess(t)</code>, to make sure you are not relaxing
@@ -651,13 +657,15 @@ public class SecurityManager
* @param host the host to connect to
* @param port the port to connect on
* @param context the context to determine access for
+ *
* @throws SecurityException if permission is denied, or if context is
* not an AccessControlContext
* @throws NullPointerException if host is null
+ *
* @see #getSecurityContext()
* @see AccessControlContext#checkPermission(Permission)
*/
- public void checkConnect(String host, int port, Object securityContext)
+ public void checkConnect(String host, int port, Object context)
{
// XXX Should be:
// if (! (context instanceof AccessControlContext))
@@ -776,9 +784,12 @@ public class SecurityManager
* you override this, call <code>super.checkPropertyAccess</code> rather
* than throwing an exception.
*
+ * @param key the key of the property to check
+ *
* @throws SecurityException if permission is denied
* @throws NullPointerException if key is null
* @throws IllegalArgumentException if key is ""
+ *
* @see System#getProperty(String)
*/
public void checkPropertyAccess(String key)
diff --git a/java/lang/String.java b/java/lang/String.java
index 374cc064d..95e0dd7fd 100644
--- a/java/lang/String.java
+++ b/java/lang/String.java
@@ -766,7 +766,7 @@ public final class String implements Serializable, Comparable, CharSequence
*
* @param toffset index to start comparison at for this String
* @param other String to compare region to this String
- * @param oofset index to start comparison at for other
+ * @param ooffset index to start comparison at for other
* @param len number of characters to compare
* @return true if regions match (case sensitive)
* @throws NullPointerException if other is null
@@ -788,7 +788,7 @@ public final class String implements Serializable, Comparable, CharSequence
* @param ignoreCase true if case should be ignored in comparision
* @param toffset index to start comparison at for this String
* @param other String to compare region to this String
- * @param oofset index to start comparison at for other
+ * @param ooffset index to start comparison at for other
* @param len number of characters to compare
* @return true if regions match, false otherwise
* @throws NullPointerException if other is null
@@ -838,7 +838,7 @@ public final class String implements Serializable, Comparable, CharSequence
* Predicate which determines if this String starts with a given prefix.
* If the prefix is an empty String, true is returned.
*
- * @param prefex String to compare
+ * @param prefix String to compare
* @return true if this String starts with the prefix
* @throws NullPointerException if prefix is null
* @see #startsWith(String, int)
@@ -1034,8 +1034,8 @@ public final class String implements Serializable, Comparable, CharSequence
* Creates a substring of this String, starting at a specified index
* and ending at one character before a specified index.
*
- * @param begin index to start substring (inclusive, base 0)
- * @param end index to end at (exclusive)
+ * @param beginIndex index to start substring (inclusive, base 0)
+ * @param endIndex index to end at (exclusive)
* @return new String which is a substring of this String
* @throws IndexOutOfBoundsException if begin &lt; 0 || end &gt; length()
* || begin > end (while unspecified, this is a
diff --git a/java/lang/StringBuffer.java b/java/lang/StringBuffer.java
index 37788b96d..c67a62d4a 100644
--- a/java/lang/StringBuffer.java
+++ b/java/lang/StringBuffer.java
@@ -396,7 +396,7 @@ public final class StringBuffer implements Serializable, CharSequence
/**
* Append the <code>char</code> to this <code>StringBuffer</code>.
*
- * @param c the <code>char</code> to append
+ * @param ch the <code>char</code> to append
* @return this <code>StringBuffer</code>
*/
public synchronized StringBuffer append(char ch)
diff --git a/java/lang/ThreadGroup.java b/java/lang/ThreadGroup.java
index f01726303..89aff3f02 100644
--- a/java/lang/ThreadGroup.java
+++ b/java/lang/ThreadGroup.java
@@ -238,16 +238,16 @@ public class ThreadGroup
* Check whether this ThreadGroup is an ancestor of the specified
* ThreadGroup, or if they are the same.
*
- * @param g the group to test on
+ * @param group the group to test on
* @return whether this ThreadGroup is a parent of the specified group
*/
- public final boolean parentOf(ThreadGroup tg)
+ public final boolean parentOf(ThreadGroup group)
{
- while (tg != null)
+ while (group != null)
{
- if (tg == this)
+ if (group == this)
return true;
- tg = tg.parent;
+ group = group.parent;
}
return false;
}
@@ -535,7 +535,7 @@ public class ThreadGroup
* manner.
*
* @param thread the thread that exited
- * @param exception the uncaught exception
+ * @param t the uncaught throwable
* @throws NullPointerException if t is null
* @see ThreadDeath
* @see System#err
diff --git a/java/lang/Throwable.java b/java/lang/Throwable.java
index 62db8fd0d..b3005afc6 100644
--- a/java/lang/Throwable.java
+++ b/java/lang/Throwable.java
@@ -392,7 +392,7 @@ public class Throwable implements Serializable
* then a line starting with three spaces and the string "... X more" is
* printed, where X is the number of remaining stackframes.
*
- * @param w the PrintWriter to write the trace to
+ * @param pw the PrintWriter to write the trace to
* @since 1.1
*/
public void printStackTrace (PrintWriter pw)