public static void addLoadInstruction ( CodeAttribute code , String type , int variable ) { char tp = type . charAt ( 0 ) ; if ( tp != ' ' && tp != ' ' ) { // we have a primitive type switch ( tp ) { case ' ' : code . lload ( variable ) ; break ; case ' ' : code . dload ( variable ) ; break ; case ' ' : code . fload ( variable ) ; break ; default : code . iload ( variable ) ; } } else { code . aload ( variable ) ; } }
Adds the correct load instruction based on the type descriptor