Fix javadoc warnings
Before this change there were numerous javadoc warnings being reported while building Spring framework API. This commit resolves most of the javadoc warnings, reducing the total number from 265 to 103. Issue: SPR-9113
This commit is contained in:
committed by
Chris Beams
parent
e830511e8a
commit
effb762558
@@ -20,7 +20,7 @@ package org.springframework.core.convert;
|
||||
* Thrown when a suitable converter could not be found in a conversion service.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @since 3.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public final class ConverterNotFoundException extends ConversionException {
|
||||
@@ -34,7 +34,6 @@ public final class ConverterNotFoundException extends ConversionException {
|
||||
* Creates a new conversion executor not found exception.
|
||||
* @param sourceType the source type requested to convert from
|
||||
* @param targetType the target type requested to convert to
|
||||
* @param message a descriptive message
|
||||
*/
|
||||
public ConverterNotFoundException(TypeDescriptor sourceType, TypeDescriptor targetType) {
|
||||
super("No converter found capable of converting from type " + sourceType + " to type " + targetType);
|
||||
|
||||
@@ -74,7 +74,7 @@ public class TypeDescriptor {
|
||||
|
||||
/**
|
||||
* Create a new type descriptor from a {@link MethodParameter}.
|
||||
* Use this constructor when a source or target conversion point is a constructor parameter, method parameter, or method return value.
|
||||
* Use this constructor when a source or target conversion point is a constructor parameter, method parameter, or method return value.
|
||||
* @param methodParameter the method parameter
|
||||
*/
|
||||
public TypeDescriptor(MethodParameter methodParameter) {
|
||||
@@ -204,7 +204,7 @@ public class TypeDescriptor {
|
||||
* Create a new type descriptor for an object.
|
||||
* Use this factory method to introspect a source object before asking the conversion system to convert it to some another type.
|
||||
* If the provided object is null, returns null, else calls {@link #valueOf(Class)} to build a TypeDescriptor from the object's class.
|
||||
* @param object the source object
|
||||
* @param source the source object
|
||||
* @return the type descriptor
|
||||
*/
|
||||
public static TypeDescriptor forObject(Object source) {
|
||||
@@ -287,7 +287,7 @@ public class TypeDescriptor {
|
||||
|
||||
/**
|
||||
* Returns true if an object of this type descriptor can be assigned to the location described by the given type descriptor.
|
||||
* For example, valueOf(String.class).isAssignableTo(valueOf(CharSequence.class)) returns true because a String value can be assigned to a CharSequence variable.
|
||||
* For example, valueOf(String.class).isAssignableTo(valueOf(CharSequence.class)) returns true because a String value can be assigned to a CharSequence variable.
|
||||
* On the other hand, valueOf(Number.class).isAssignableTo(valueOf(Integer.class)) returns false because, while all Integers are Numbers, not all Numbers are Integers.
|
||||
* <p>
|
||||
* For arrays, collections, and maps, element and key/value types are checked if declared.
|
||||
@@ -348,7 +348,7 @@ public class TypeDescriptor {
|
||||
* Narrows the {@link #getElementTypeDescriptor() elementType} property to the class of the provided collection or array element.
|
||||
* For example, if this describes a java.util.List<java.lang.Number< and the element argument is a java.lang.Integer, the returned TypeDescriptor will be java.lang.Integer.
|
||||
* If this describes a java.util.List<?> and the element argument is a java.lang.Integer, the returned TypeDescriptor will be java.lang.Integer as well.
|
||||
* Annotation and nested type context will be preserved in the narrowed TypeDescriptor that is returned.
|
||||
* Annotation and nested type context will be preserved in the narrowed TypeDescriptor that is returned.
|
||||
* @param element the collection or array element
|
||||
* @return a element type descriptor, narrowed to the type of the provided element
|
||||
* @throws IllegalStateException if this type is not a java.util.Collection or Array type
|
||||
@@ -383,7 +383,7 @@ public class TypeDescriptor {
|
||||
* Narrows the {@link #getMapKeyTypeDescriptor() mapKeyType} property to the class of the provided map key.
|
||||
* For example, if this describes a java.util.Map<java.lang.Number, java.lang.String< and the key argument is a java.lang.Integer, the returned TypeDescriptor will be java.lang.Integer.
|
||||
* If this describes a java.util.Map<?, ?> and the key argument is a java.lang.Integer, the returned TypeDescriptor will be java.lang.Integer as well.
|
||||
* Annotation and nested type context will be preserved in the narrowed TypeDescriptor that is returned.
|
||||
* Annotation and nested type context will be preserved in the narrowed TypeDescriptor that is returned.
|
||||
* @param mapKey the map key
|
||||
* @return the map key type descriptor
|
||||
* @throws IllegalStateException if this type is not a java.util.Map.
|
||||
@@ -409,10 +409,10 @@ public class TypeDescriptor {
|
||||
* Narrows the {@link #getMapValueTypeDescriptor() mapValueType} property to the class of the provided map value.
|
||||
* For example, if this describes a java.util.Map<java.lang.String, java.lang.Number< and the value argument is a java.lang.Integer, the returned TypeDescriptor will be java.lang.Integer.
|
||||
* If this describes a java.util.Map<?, ?> and the value argument is a java.lang.Integer, the returned TypeDescriptor will be java.lang.Integer as well.
|
||||
* Annotation and nested type context will be preserved in the narrowed TypeDescriptor that is returned.
|
||||
* Annotation and nested type context will be preserved in the narrowed TypeDescriptor that is returned.
|
||||
* @param mapValue the map value
|
||||
* @return the map value type descriptor
|
||||
* @throws IllegalStateException if this type is not a java.util.Map.
|
||||
* @throws IllegalStateException if this type is not a java.util.Map.
|
||||
*/
|
||||
public TypeDescriptor getMapValueTypeDescriptor(Object mapValue) {
|
||||
return narrow(mapValue, getMapValueTypeDescriptor());
|
||||
|
||||
@@ -41,9 +41,9 @@ import static org.springframework.util.StringUtils.*;
|
||||
*
|
||||
* <p>Concrete subclasses differ primarily on which {@link PropertySource} objects they
|
||||
* add by default. {@code AbstractEnvironment} adds none. Subclasses should contribute
|
||||
* property sources through the protected {@link #customizePropertySources()} hook, while
|
||||
* clients should customize using {@link ConfigurableEnvironment#getPropertySources()} and
|
||||
* working against the {@link MutablePropertySources} API. See
|
||||
* property sources through the protected {@link #customizePropertySources(MutablePropertySources)}
|
||||
* hook, while clients should customize using {@link ConfigurableEnvironment#getPropertySources()}
|
||||
* and working against the {@link MutablePropertySources} API. See
|
||||
* {@link ConfigurableEnvironment} Javadoc for usage examples.
|
||||
*
|
||||
* @author Chris Beams
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -56,7 +56,7 @@ public interface PropertyResolver {
|
||||
* Return the property value associated with the given key, or {@code null}
|
||||
* if the key cannot be resolved.
|
||||
* @param key the property name to resolve
|
||||
* @param T the expected type of the property value
|
||||
* @param targetType the expected type of the property value
|
||||
* @see #getRequiredProperty(String, Class)
|
||||
*/
|
||||
<T> T getProperty(String key, Class<T> targetType);
|
||||
@@ -65,11 +65,11 @@ public interface PropertyResolver {
|
||||
* Return the property value associated with the given key, or
|
||||
* {@code defaultValue} if the key cannot be resolved.
|
||||
* @param key the property name to resolve
|
||||
* @param T the expected type of the property value
|
||||
* @param targetType the expected type of the property value
|
||||
* @param defaultValue the default value to return if no value is found
|
||||
* @see #getRequiredProperty(String, Class)
|
||||
*/
|
||||
<T> T getProperty(String string, Class<T> targetType, T defaultValue);
|
||||
<T> T getProperty(String key, Class<T> targetType, T defaultValue);
|
||||
|
||||
/**
|
||||
* Convert the property value associated with the given key to a {@code Class}
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.core.serializer.Serializer;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A {@Link Converter} that delegates to a {@link org.springframework.core.serializer.Serializer}
|
||||
* A {@link Converter} that delegates to a {@link org.springframework.core.serializer.Serializer}
|
||||
* to convert an object to a byte array.
|
||||
*
|
||||
* @author Gary Russell
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ExecutorServiceAdapter extends AbstractExecutorService {
|
||||
|
||||
/**
|
||||
* Create a new ExecutorServiceAdapter, using the given target executor.
|
||||
* @param concurrentExecutor the target executor to delegate to
|
||||
* @param taskExecutor the target executor to delegate to
|
||||
*/
|
||||
public ExecutorServiceAdapter(TaskExecutor taskExecutor) {
|
||||
Assert.notNull(taskExecutor, "TaskExecutor must not be null");
|
||||
|
||||
Reference in New Issue
Block a user