HtmlToPdfFailureExceptionHelper.java 2.62 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.html2pdf;

import com.adobe.html2pdf.HtmlToPdfFailureException;
import org.omg.CORBA.*;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;

public abstract class HtmlToPdfFailureExceptionHelper {
    private static String _id = "IDL:com/adobe/html2pdf/HtmlToPdfFailureException:1.0";
    private static TypeCode __typeCode = null;
    private static boolean __active = false;

    public static void insert(Any a, HtmlToPdfFailureException that) {
        OutputStream out = a.create_output_stream();
        a.type(HtmlToPdfFailureExceptionHelper.type());
        HtmlToPdfFailureExceptionHelper.write(out, that);
        a.read_value(out.create_input_stream(), HtmlToPdfFailureExceptionHelper.type());
    }

    public static HtmlToPdfFailureException extract(Any a) {
        return HtmlToPdfFailureExceptionHelper.read(a.create_input_stream());
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    public static synchronized TypeCode type() {
        if (__typeCode != null) return __typeCode;
        Class<TypeCode> class_ = TypeCode.class;
        synchronized (TypeCode.class) {
            if (__typeCode != null) return __typeCode;
            {
                if (__active) {
                    // ** MonitorExit[var0] (shouldn't be in output)
                    return ORB.init().create_recursive_tc(_id);
                }
                __active = true;
                StructMember[] _members0 = new StructMember[1];
                TypeCode _tcOf_members0 = null;
                _tcOf_members0 = ORB.init().get_primitive_tc(TCKind.tk_long);
                _members0[0] = new StructMember("errorCode", _tcOf_members0, null);
                __typeCode = ORB.init().create_exception_tc(HtmlToPdfFailureExceptionHelper.id(), "HtmlToPdfFailureException", _members0);
                __active = false;
            }
            // ** MonitorExit[var0] (shouldn't be in output)
            return __typeCode;
        }
    }

    public static String id() {
        return _id;
    }

    public static HtmlToPdfFailureException read(InputStream istream) {
        HtmlToPdfFailureException value = new HtmlToPdfFailureException();
        istream.read_string();
        value.errorCode = istream.read_long();
        return value;
    }

    public static void write(OutputStream ostream, HtmlToPdfFailureException value) {
        ostream.write_string(HtmlToPdfFailureExceptionHelper.id());
        ostream.write_long(value.errorCode);
    }
}