protected static void autoUnBoxing1 ( MethodVisitor mv , Type fieldType ) { switch ( fieldType . getSort ( ) ) { case Type . BOOLEAN : mv . visitTypeInsn ( CHECKCAST , "java/lang/Boolean" ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , "java/lang/Boolean" , "booleanValue" , "()Z" ) ; break ; case Type . BYTE : mv . visitTypeInsn ( CHECKCAST , "java/lang/Byte" ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , "java/lang/Byte" , "byteValue" , "()B" ) ; break ; case Type . CHAR : mv . visitTypeInsn ( CHECKCAST , "java/lang/Character" ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , "java/lang/Character" , "charValue" , "()C" ) ; break ; case Type . SHORT : mv . visitTypeInsn ( CHECKCAST , "java/lang/Short" ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , "java/lang/Short" , "shortValue" , "()S" ) ; break ; case Type . INT : mv . visitTypeInsn ( CHECKCAST , "java/lang/Integer" ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , "java/lang/Integer" , "intValue" , "()I" ) ; break ; case Type . FLOAT : mv . visitTypeInsn ( CHECKCAST , "java/lang/Float" ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , "java/lang/Float" , "floatValue" , "()F" ) ; break ; case Type . LONG : mv . visitTypeInsn ( CHECKCAST , "java/lang/Long" ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , "java/lang/Long" , "longValue" , "()J" ) ; break ; case Type . DOUBLE : mv . visitTypeInsn ( CHECKCAST , "java/lang/Double" ) ; mv . visitMethodInsn ( INVOKEVIRTUAL , "java/lang/Double" , "doubleValue" , "()D" ) ; break ; case Type . ARRAY : mv . visitTypeInsn ( CHECKCAST , fieldType . getInternalName ( ) ) ; break ; default : mv . visitTypeInsn ( CHECKCAST , fieldType . getInternalName ( ) ) ; } }
Append the call of proper extract primitive type of an boxed object .