public static boolean primitiveIsAssignableFrom ( Class < ? > lhs , Class < ? > rhs ) { if ( lhs == null || rhs == null ) { return false ; } if ( ! ( lhs . isPrimitive ( ) && rhs . isPrimitive ( ) ) ) { return false ; } if ( lhs . equals ( rhs ) ) { return true ; } Set < Class < ? > > wideningSet = _primitiveWideningsMap . get ( rhs ) ; if ( wideningSet == null ) { return false ; } return wideningSet . contains ( lhs ) ; }
Tells whether an instance of the primitive class represented by rhs can be assigned to an instance of the primitive class represented by lhs .