Package org.springframework.util

# Class TypeUtils

java.lang.Object
org.springframework.util.TypeUtils

public abstract class TypeUtils extends Object
Utility to work with generic type parameters.

Mainly for internal use within the framework.

Since:
  2.0.7
Author:
  Ramnivas Laddad, Juergen Hoeller, Chris Beams, Sam Brannen

## Constructor Summary

Constructors
Constructor
Description
`TypeUtils()`

## Method Summary

Modifier and Type
Method
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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TypeUtils

public TypeUtils()

## Method Details

### 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 (left-hand side (LHS) type)
  `rhsType` - the value type (right-hand side (RHS) type) that should be assigned to the target type
Returns:
  `true` if `rhsType` is assignable to `lhsType`
See Also:
  - `ClassUtils.isAssignable(Class, Class)`

### isAssignableBound

public static boolean isAssignableBound(@Nullable Type lhsType, @Nullable Type rhsType)