Polish contribution
See gh-30282
This commit is contained in:
@@ -43,7 +43,8 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Miscellaneous {@code java.lang.Class} utility methods.
|
||||
* Mainly for internal use within the framework.
|
||||
*
|
||||
* <p>Mainly for internal use within the framework.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @author Keith Donald
|
||||
@@ -532,8 +533,9 @@ public abstract class ClassUtils {
|
||||
* type, assuming setting by reflection. Considers primitive wrapper
|
||||
* classes as assignable to the corresponding primitive types.
|
||||
* @param lhsType the target type (left-hand side (LHS) type)
|
||||
* @param rhsType the value type (right-hand side (RHS) type) that should be assigned to the target type
|
||||
* @return if the target type is assignable from the value type
|
||||
* @param rhsType the value type (right-hand side (RHS) type) that should
|
||||
* be assigned to the target type
|
||||
* @return {@code true} if {@code rhsType} is assignable to {@code lhsType}
|
||||
* @see TypeUtils#isAssignable(java.lang.reflect.Type, java.lang.reflect.Type)
|
||||
*/
|
||||
public static boolean isAssignable(Class<?> lhsType, Class<?> rhsType) {
|
||||
|
||||
@@ -40,8 +40,10 @@ public abstract class TypeUtils {
|
||||
* Check if the right-hand side type may be assigned to the left-hand side
|
||||
* type following the Java generics rules.
|
||||
* @param lhsType the target type (left-hand side (LHS) type)
|
||||
* @param rhsType the value type (right-hand side (RHS) type) that should be assigned to the target type
|
||||
* @return true if rhs is assignable to lhs
|
||||
* @param rhsType the value type (right-hand side (RHS) type) that should
|
||||
* be assigned to the target type
|
||||
* @return {@code true} if {@code rhsType} is assignable to {@code lhsType}
|
||||
* @see ClassUtils#isAssignable(Class, Class)
|
||||
*/
|
||||
public static boolean isAssignable(Type lhsType, Type rhsType) {
|
||||
Assert.notNull(lhsType, "Left-hand side type must not be null");
|
||||
|
||||
Reference in New Issue
Block a user