MCPcopy Create free account
hub / github.com/beanshell/beanshell / isJavaAssignable

Method isJavaAssignable

src/bsh/Types.java:286–289  ·  view source on GitHub ↗

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 )

Source from the content-addressed store, hash-verified

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)

Callers 2

castPrimitiveMethod · 0.95

Calls 2

isJavaBaseAssignableMethod · 0.95

Tested by

no test coverage detected