org.springframework.util
Class TypeUtils
- java.lang.Object
-
- org.springframework.util.TypeUtils
public abstract class TypeUtils extends Object
Utility to work with Java 5 generic type parameters. Mainly for internal use within the framework.- Since:
- 2.0.7
- Author:
- Ramnivas Laddad, Juergen Hoeller, Chris Beams
-
Constructor Summary
Constructors Constructor and Description TypeUtils()
Method Summary
Methods Modifier and Type Method and Description static boolean
isAssignable(Type lhsType, Type rhsType)
Check if the right-hand side type may be assigned to the left-hand side type following the Java generics rules.static boolean
isAssignableBound(Type lhsType, Type rhsType)
-
Method Detail
isAssignable
public static boolean isAssignable(Type lhsType, Type rhsType)
Check if the right-hand side type may be assigned to the left-hand side type following the Java generics rules.- Parameters:
-
lhsType
- the target type -
rhsType
- the value type that should be assigned to the target type - Returns:
- true if rhs is assignable to lhs