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

Method castToType

src/bsh/Primitive.java:974–980  ·  view source on GitHub ↗

Cast this bsh.Primitive value to a new bsh.Primitive value This is usually a numeric type cast. Other cases include: A boolean can be cast to boolen null can be cast to any object type and remains null Attempting to cast a void causes an exception @param toType is the java object or pr

( Class toType, int operation )

Source from the content-addressed store, hash-verified

972 @param toType is the java object or primitive TYPE class
973 */
974 public Primitive castToType( Class toType, int operation )
975 throws UtilEvalError
976 {
977 return castPrimitive(
978 toType, getType()/*fromType*/, this/*fromValue*/,
979 false/*checkOnly*/, operation );
980 }
981
982 /*
983 Cast or check a cast of a primitive type to another type.

Callers 1

getDefaultValueMethod · 0.80

Calls 2

castPrimitiveMethod · 0.95
getTypeMethod · 0.95

Tested by

no test coverage detected