Test if a conversion of the rhsType type to the lhsType type is legal via standard Java assignment conversion rules (i.e. without a cast). The rules include Java 5 autoboxing/unboxing. For Java primitive TYPE classes this method takes primitive promotion into account. The ordinary C
( Class lhsType, Class rhsType )
| 284 | @param rhsType assigning from rhsType to lhsType |
| 285 | */ |
| 286 | static boolean isJavaAssignable( Class lhsType, Class rhsType ) { |
| 287 | return isJavaBaseAssignable( lhsType, rhsType ) |
| 288 | || isJavaBoxTypesAssignable( lhsType, rhsType ); |
| 289 | } |
| 290 | |
| 291 | /** |
| 292 | Is the assignment legal via original Java (up to version 1.4) |
no test coverage detected