public void addConstZero(CtClass type) {
        if (type.isPrimitive()) {
            if (type == CtClass.longType)
                addOpcode(LCONST_0);
            else if (type == CtClass.floatType)
                addOpcode(FCONST_0);
            else if (type == CtClass.doubleType)
                addOpcode(DCONST_0);
            else if (type == CtClass.voidType)
                throw new RuntimeException("void type?");
            else
                addOpcode(ICONST_0);
        }
        else
            addOpcode(ACONST_NULL);
    }