private void primitive ( int typeCode , Object obj ) { switch ( typeCode ) { case T_BOOLEAN : dest . emit ( LDC , ( ( Boolean ) obj ) . booleanValue ( ) ? 1 : 0 ) ; break ; case T_CHAR : dest . emit ( LDC , ( ( Character ) obj ) . charValue ( ) ) ; break ; case T_BYTE : case T_SHORT : dest . emit ( LDC , ( ( Number ) obj ) . intValue ( ) ) ; break ; case T_INT : case T_FLOAT : case T_LONG : case T_DOUBLE : dest . emitGeneric ( LDC , new Object [ ] { obj } ) ; break ; default : throw new IllegalArgumentException ( "not supported: " + typeCode ) ; } }
generates exactly 1 instruction .