Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2022 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.
|
||||
@@ -48,11 +48,11 @@ import org.springframework.util.StringUtils;
|
||||
* {@link #getGeneric(int...) generic parameters} along with the ability to ultimately
|
||||
* {@link #resolve() resolve} to a {@link java.lang.Class}.
|
||||
*
|
||||
* <p>{@code ResolvableTypes} may be obtained from {@link #forField(Field) fields},
|
||||
* {@link #forMethodParameter(Method, int) method parameters},
|
||||
* {@link #forMethodReturnType(Method) method returns} or
|
||||
* {@link #forClass(Class) classes}. Most methods on this class will themselves return
|
||||
* {@link ResolvableType ResolvableTypes}, allowing easy navigation. For example:
|
||||
* <p>A {@code ResolvableType} may be obtained from a {@linkplain #forField(Field) field},
|
||||
* a {@linkplain #forMethodParameter(Method, int) method parameter},
|
||||
* a {@linkplain #forMethodReturnType(Method) method return type}, or a
|
||||
* {@linkplain #forClass(Class) class}. Most methods on this class will themselves return
|
||||
* a {@code ResolvableType}, allowing for easy navigation. For example:
|
||||
* <pre class="code">
|
||||
* private HashMap<Integer, List<String>> myMap;
|
||||
*
|
||||
@@ -182,7 +182,7 @@ public class ResolvableType implements Serializable {
|
||||
|
||||
/**
|
||||
* Private constructor used to create a new {@link ResolvableType} on a {@link Class} basis.
|
||||
* Avoids all {@code instanceof} checks in order to create a straight {@link Class} wrapper.
|
||||
* <p>Avoids all {@code instanceof} checks in order to create a straight {@link Class} wrapper.
|
||||
* @since 4.2
|
||||
*/
|
||||
private ResolvableType(@Nullable Class<?> clazz) {
|
||||
@@ -406,7 +406,7 @@ public class ResolvableType implements Serializable {
|
||||
|
||||
/**
|
||||
* Convenience method to return this type as a resolvable {@link Collection} type.
|
||||
* Returns {@link #NONE} if this type does not implement or extend
|
||||
* <p>Returns {@link #NONE} if this type does not implement or extend
|
||||
* {@link Collection}.
|
||||
* @see #as(Class)
|
||||
* @see #asMap()
|
||||
@@ -417,7 +417,7 @@ public class ResolvableType implements Serializable {
|
||||
|
||||
/**
|
||||
* Convenience method to return this type as a resolvable {@link Map} type.
|
||||
* Returns {@link #NONE} if this type does not implement or extend
|
||||
* <p>Returns {@link #NONE} if this type does not implement or extend
|
||||
* {@link Map}.
|
||||
* @see #as(Class)
|
||||
* @see #asCollection()
|
||||
@@ -458,7 +458,7 @@ public class ResolvableType implements Serializable {
|
||||
|
||||
/**
|
||||
* Return a {@link ResolvableType} representing the direct supertype of this type.
|
||||
* If no supertype is available this method returns {@link #NONE}.
|
||||
* <p>If no supertype is available this method returns {@link #NONE}.
|
||||
* <p>Note: The resulting {@link ResolvableType} instance may not be {@link Serializable}.
|
||||
* @see #getInterfaces()
|
||||
*/
|
||||
@@ -608,7 +608,7 @@ public class ResolvableType implements Serializable {
|
||||
|
||||
/**
|
||||
* Return a {@link ResolvableType} for the specified nesting level.
|
||||
* See {@link #getNested(int, Map)} for details.
|
||||
* <p>See {@link #getNested(int, Map)} for details.
|
||||
* @param nestingLevel the nesting level
|
||||
* @return the {@link ResolvableType} type, or {@code #NONE}
|
||||
*/
|
||||
@@ -999,7 +999,7 @@ public class ResolvableType implements Serializable {
|
||||
/**
|
||||
* Return a {@link ResolvableType} for the specified {@link Class},
|
||||
* using the full generic type information for assignability checks.
|
||||
* For example: {@code ResolvableType.forClass(MyArrayList.class)}.
|
||||
* <p>For example: {@code ResolvableType.forClass(MyArrayList.class)}.
|
||||
* @param clazz the class to introspect ({@code null} is semantically
|
||||
* equivalent to {@code Object.class} for typical use cases here)
|
||||
* @return a {@link ResolvableType} for the specified class
|
||||
@@ -1014,7 +1014,7 @@ public class ResolvableType implements Serializable {
|
||||
* Return a {@link ResolvableType} for the specified {@link Class},
|
||||
* doing assignability checks against the raw class only (analogous to
|
||||
* {@link Class#isAssignableFrom}, which this serves as a wrapper for.
|
||||
* For example: {@code ResolvableType.forRawClass(List.class)}.
|
||||
* <p>For example: {@code ResolvableType.forRawClass(List.class)}.
|
||||
* @param clazz the class to introspect ({@code null} is semantically
|
||||
* equivalent to {@code Object.class} for typical use cases here)
|
||||
* @return a {@link ResolvableType} for the specified class
|
||||
@@ -1043,7 +1043,7 @@ public class ResolvableType implements Serializable {
|
||||
/**
|
||||
* Return a {@link ResolvableType} for the specified base type
|
||||
* (interface or base class) with a given implementation class.
|
||||
* For example: {@code ResolvableType.forClass(List.class, MyArrayList.class)}.
|
||||
* <p>For example: {@code ResolvableType.forClass(List.class, MyArrayList.class)}.
|
||||
* @param baseType the base type (must not be {@code null})
|
||||
* @param implementationClass the implementation class
|
||||
* @return a {@link ResolvableType} for the specified base type backed by the
|
||||
@@ -1238,7 +1238,7 @@ public class ResolvableType implements Serializable {
|
||||
|
||||
/**
|
||||
* Return a {@link ResolvableType} for the specified {@link Method} return type.
|
||||
* Use this variant when the class that declares the method includes generic
|
||||
* <p>Use this variant when the class that declares the method includes generic
|
||||
* parameter variables that are satisfied by the implementation class.
|
||||
* @param method the source for the method return type
|
||||
* @param implementationClass the implementation class
|
||||
|
||||
Reference in New Issue
Block a user