private void codeWrapArgument(Class<?> type,int slot,DataOutputStream out) throws IOException {
  if (type.isPrimitive()) {
    PrimitiveTypeInfo prim=PrimitiveTypeInfo.get(type);
    if (type == int.class || type == boolean.class || type == byte.class || type == char.class || type == short.class) {
      code_iload(slot,out);
    }
 else     if (type == long.class) {
      code_lload(slot,out);
    }
 else     if (type == float.class) {
      code_fload(slot,out);
    }
 else     if (type == double.class) {
      code_dload(slot,out);
    }
 else {
      throw new AssertionError();
    }
    out.writeByte(opc_invokestatic);
    out.writeShort(cp.getMethodRef(prim.wrapperClassName,"valueOf",prim.wrapperValueOfDesc));
  }
 else {
    code_aload(slot,out);
  }
}

private void codeWrapArgument ( Class < ? > type , int slot , DataOutputStream out ) throws IOException { if ( type . isPrimitive ( ) ) { PrimitiveTypeInfo prim = PrimitiveTypeInfo . get ( type ) ; if ( type == int . class || type == boolean . class || type == byte . class || type == char . class || type == short . class ) { code_iload ( slot , out ) ; } else if ( type == long . class ) { code_lload ( slot , out ) ; } else if ( type == float . class ) { code_fload ( slot , out ) ; } else if ( type == double . class ) { code_dload ( slot , out ) ; } else { throw new AssertionError ( ) ; } out . writeByte ( opc_invokestatic ) ; out . writeShort ( cp . getMethodRef ( prim . wrapperClassName , "valueOf" , prim . wrapperValueOfDesc ) ) ; } else { code_aload ( slot , out ) ; } }
generate code for wrapping an argument of the given type whose value can be found at the specified local variable index , in order for it to be passed ( as an object ) to the invocation handler ' s " invoke " method . the code is written to the supplied stream .
