public void box(final Type type){
  if (type.getSort() == Type.OBJECT || type.getSort() == Type.ARRAY) {
    return;
  }
  if (type == Type.VOID_TYPE) {
    push((String)null);
  }
 else {
    Type boxed=getBoxedType(type);
    newInstance(boxed);
    if (type.getSize() == 2) {
      dupX2();
      dupX2();
      pop();
    }
 else {
      dupX1();
      swap();
    }
    invokeConstructor(boxed,new Method("<init>",Type.VOID_TYPE,new Type[]{type}));
  }
}

public void box ( final Type type ) { if ( type . getSort ( ) == Type . OBJECT || type . getSort ( ) == Type . ARRAY ) { return ; } if ( type == Type . VOID_TYPE ) { push ( ( String ) null ) ; } else { Type boxed = getBoxedType ( type ) ; newInstance ( boxed ) ; if ( type . getSize ( ) == 2 ) { dupX2 ( ) ; dupX2 ( ) ; pop ( ) ; } else { dupX1 ( ) ; swap ( ) ; } invokeConstructor ( boxed , new Method ( "<init>" , Type . VOID_TYPE , new Type [ ] { type } ) ) ; } }
generates the instructions to box the top stack value . this value is replaced by its boxed equivalent on top of the stack .
