8284851: Update javax.crypto files to use proper javadoc for mentioned classes

Reviewed-by: weijun, valeriep
This commit is contained in:
Mark Powers 2022-07-07 23:20:58 +00:00 committed by Valerie Peng
parent 8cdead0c94
commit f804f2ce8e
92 changed files with 2142 additions and 2010 deletions

View file

@ -171,7 +171,7 @@ public abstract class Provider extends Properties {
}
/**
* Constructs a provider with the specified name, version number,
* Constructs a {@code Provider} with the specified name, version number,
* and information. Calling this constructor is equivalent to call the
* {@link #Provider(String, String, String)} with {@code name}
* name, {@code Double.toString(version)}, and {@code info}.
@ -198,7 +198,7 @@ public abstract class Provider extends Properties {
}
/**
* Constructs a provider with the specified name, version string,
* Constructs a {@code Provider} with the specified name, version string,
* and information.
*
* <p>The version string contains a version number optionally followed
@ -238,10 +238,11 @@ public abstract class Provider extends Properties {
}
/**
* Apply the supplied configuration argument to this provider instance
* and return the configured provider. Note that if this provider cannot
* be configured in-place, a new provider will be created and returned.
* Therefore, callers should always use the returned provider.
* Apply the supplied configuration argument to this {@code Provider}
* instance and return the configured {@code Provider}. Note that if
* this {@code Provider} cannot be configured in-place, a new
* {@code Provider} will be created and returned. Therefore,
* callers should always use the returned {@code Provider}.
*
* @implSpec
* The default implementation throws {@code UnsupportedOperationException}.
@ -254,10 +255,11 @@ public abstract class Provider extends Properties {
* @throws UnsupportedOperationException if a configuration argument is
* not supported.
* @throws NullPointerException if the supplied configuration argument is
* null.
* {@code null}.
* @throws InvalidParameterException if the supplied configuration argument
* is invalid.
* @return a provider configured with the supplied configuration argument.
* @return a {@code Provider} configured with the supplied configuration
* argument.
*
* @since 9
*/
@ -266,14 +268,15 @@ public abstract class Provider extends Properties {
}
/**
* Check if this provider instance has been configured.
* Check if this {@code Provider} instance has been configured.
*
* @implSpec
* The default implementation returns true.
* Subclasses should override this method if the provider instance requires
* The default implementation returns {@code true}.
* Subclasses should override this method if the {@code Provider} requires
* an explicit {@code configure} call after being constructed.
*
* @return true if no further configuration is needed, false otherwise.
* @return {@code true} if no further configuration is needed,
* {@code false} otherwise.
*
* @since 9
*/
@ -283,18 +286,18 @@ public abstract class Provider extends Properties {
/**
* Returns the name of this provider.
* Returns the name of this {@code Provider}.
*
* @return the name of this provider.
* @return the name of this {@code Provider}.
*/
public String getName() {
return name;
}
/**
* Returns the version number for this provider.
* Returns the version number for this {@code Provider}.
*
* @return the version number for this provider.
* @return the version number for this {@code Provider}.
*
* @deprecated use {@link #getVersionStr} instead.
*/
@ -304,9 +307,9 @@ public abstract class Provider extends Properties {
}
/**
* Returns the version string for this provider.
* Returns the version string for this {@code Provider}.
*
* @return the version string for this provider.
* @return the version string for this {@code Provider}.
*
* @since 9
*/
@ -315,10 +318,10 @@ public abstract class Provider extends Properties {
}
/**
* Returns a human-readable description of the provider and its
* Returns a human-readable description of the {@code Provider} and its
* services. This may return an HTML page, with relevant links.
*
* @return a description of the provider and its services.
* @return a description of the {@code Provider} and its services.
*/
public String getInfo() {
return info;
@ -326,10 +329,10 @@ public abstract class Provider extends Properties {
/**
* Returns a string with the name and the version string
* of this provider.
* of this {@code Provider}.
*
* @return the string with the name and the version string
* for this provider.
* for this {@code Provider}.
*/
public String toString() {
return name + " version " + versionStr;
@ -342,8 +345,8 @@ public abstract class Provider extends Properties {
*/
/**
* Clears this provider so that it no longer contains the properties
* used to look up facilities implemented by the provider.
* Clears this {@code Provider} so that it no longer contains the properties
* used to look up facilities implemented by the {@code Provider}.
*
* <p>If a security manager is enabled, its {@code checkSecurityAccess}
* method is called with the string {@code "clearProviderProperties."+name}
@ -386,8 +389,8 @@ public abstract class Provider extends Properties {
}
/**
* Copies all the mappings from the specified Map to this provider.
* These mappings will replace any properties that this provider had
* Copies all the mappings from the specified Map to this {@code Provider}.
* These mappings will replace any properties that this {@code Provider} had
* for any of the keys currently in the specified Map.
*
* @since 1.2
@ -403,7 +406,7 @@ public abstract class Provider extends Properties {
/**
* Returns an unmodifiable Set view of the property entries contained
* in this Provider.
* in this {@code Provider}.
*
* @see java.util.Map.Entry
* @since 1.2
@ -431,7 +434,7 @@ public abstract class Provider extends Properties {
/**
* Returns an unmodifiable Set view of the property keys contained in
* this provider.
* this {@code Provider}.
*
* @since 1.2
*/
@ -443,7 +446,7 @@ public abstract class Provider extends Properties {
/**
* Returns an unmodifiable Collection view of the property values
* contained in this provider.
* contained in this {@code Provider}.
*
* @since 1.2
*/
@ -727,10 +730,10 @@ public abstract class Provider extends Properties {
/**
* If the specified key is not already associated with a value or is
* associated with null, associates it with the given value. Otherwise,
* replaces the value with the results of the given remapping function,
* or removes if the result is null. This method may be of use when
* combining multiple mapped values for a key.
* associated with {@code null}, associates it with the given value.
* Otherwise, replaces the value with the results of the given remapping
* function, or removes if the result is {@code null}. This method may be
* of use when combining multiple mapped values for a key.
*
* <p>If a security manager is enabled, its {@code checkSecurityAccess}
* method is called with the strings {@code "putProviderProperty."+name}
@ -856,9 +859,10 @@ public abstract class Provider extends Properties {
/**
* Reads the {@code ObjectInputStream} for the default serializable fields.
* If the serialized field {@code versionStr} is found in the STREAM FIELDS,
* its String value will be used to populate both the version string and
* version number. If {@code versionStr} is not found, but {@code version}
* is, then its double value will be used to populate both fields.
* its {@code String} value will be used to populate both the version string
* and version number. If {@code versionStr} is not found, but
* {@code version} is, then its double value will be used to populate
* both fields.
*
* @param in the {@code ObjectInputStream} to read
* @throws IOException if an I/O error occurs
@ -1250,7 +1254,7 @@ public abstract class Provider extends Properties {
/**
* Get the service describing this Provider's implementation of the
* specified type of this algorithm or alias. If no such
* implementation exists, this method returns null. If there are two
* implementation exists, this method returns {@code null}. If there are two
* matching services, one added to this provider using
* {@link #putService putService()} and one added via {@link #put put()},
* the service added via {@link #putService putService()} is returned.
@ -1261,9 +1265,9 @@ public abstract class Provider extends Properties {
* alias) of the service requested (for example, {@code SHA-1})
*
* @return the service describing this Provider's matching service
* or null if no such service exists
* or {@code null} if no such service exists
*
* @throws NullPointerException if type or algorithm is null
* @throws NullPointerException if type or algorithm is {@code null}
*
* @since 1.5
*/
@ -1302,10 +1306,10 @@ public abstract class Provider extends Properties {
/**
* Get an unmodifiable Set of all services supported by
* this Provider.
* this {@code Provider}.
*
* @return an unmodifiable Set of all services supported by
* this Provider
* this {@code Provider}
*
* @since 1.5
*/
@ -1351,7 +1355,7 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method denies
* access to set property values.
* @throws NullPointerException if s is null
* @throws NullPointerException if s is {@code null}
*
* @since 1.5
*/
@ -1452,7 +1456,7 @@ public abstract class Provider extends Properties {
/**
* Remove a service previously added using
* {@link #putService putService()}. The specified service is removed from
* this provider. It will no longer be returned by
* this {@code Provider}. It will no longer be returned by
* {@link #getService getService()} and its information will be removed
* from this provider's Hashtable.
*
@ -1473,7 +1477,7 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method denies
* access to remove this provider's properties.
* @throws NullPointerException if s is null
* @throws NullPointerException if s is {@code null}
*
* @since 1.5
*/
@ -1627,7 +1631,7 @@ public abstract class Provider extends Properties {
* an algorithm name, and the name of the class that implements the
* service. Optionally, it also includes a list of alternate algorithm
* names for this service (aliases) and attributes, which are a map of
* (name, value) String pairs.
* (name, value) {@code String} pairs.
*
* <p>This class defines the methods {@link #supportsParameter
* supportsParameter()} and {@link #newInstance newInstance()}
@ -1737,12 +1741,13 @@ public abstract class Provider extends Properties {
* @param type the type of this service
* @param algorithm the algorithm name
* @param className the name of the class implementing this service
* @param aliases List of aliases or null if algorithm has no aliases
* @param attributes Map of attributes or null if this implementation
* has no attributes
* @param aliases List of aliases or {@code null} if algorithm has no
* aliases
* @param attributes Map of attributes or {@code null} if this
* implementation has no attributes
*
* @throws NullPointerException if provider, type, algorithm, or
* className is null
* className is {@code null}
*/
public Service(Provider provider, String type, String algorithm,
String className, List<String> aliases,
@ -1814,15 +1819,15 @@ public abstract class Provider extends Properties {
}
/**
* Return the value of the specified attribute or null if this
* Return the value of the specified attribute or {@code null} if this
* attribute is not set for this Service.
*
* @param name the name of the requested attribute
*
* @return the value of the specified attribute or null if the
* @return the value of the specified attribute or {@code null} if the
* attribute is not present
*
* @throws NullPointerException if name is null
* @throws NullPointerException if name is {@code null}
*/
public final String getAttribute(String name) {
if (name == null) {
@ -1847,7 +1852,8 @@ public abstract class Provider extends Properties {
* Java Cryptography Architecture (JCA) Reference Guide}.
*
* @param constructorParameter the value to pass to the constructor,
* or null if this type of service does not use a constructorParameter.
* or {@code null} if this type of service does not use a
* constructorParameter.
*
* @return a new implementation of this service
*
@ -2008,9 +2014,9 @@ public abstract class Provider extends Properties {
/**
* Test whether this Service can use the specified parameter.
* Returns false if this service cannot use the parameter. Returns
* true if this service can use the parameter, if a fast test is
* infeasible, or if the status is unknown.
* Returns {@code false} if this service cannot use the parameter.
* Returns {@code true} if this service can use the parameter,
* if a fast test is infeasible, or if the status is unknown.
*
* <p>The security provider framework uses this method with
* some types of services to quickly exclude non-matching
@ -2025,8 +2031,8 @@ public abstract class Provider extends Properties {
*
* @param parameter the parameter to test
*
* @return false if this service cannot use the specified
* parameter; true if it can possibly use the parameter
* @return {@code false} if this service cannot use the specified
* parameter; {@code true} if it can possibly use the parameter
*
* @throws InvalidParameterException if the value of parameter is
* invalid for this type of service or if this method cannot be
@ -2145,9 +2151,9 @@ public abstract class Provider extends Properties {
}
/**
* Return a String representation of this service.
* Return a {@code String} representation of this service.
*
* @return a String representation of this service.
* @return a {@code String} representation of this service.
*/
public String toString() {
String aString = aliases.isEmpty()