ColorProfileServiceHelper.java 2.43 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.colorprofile;

import com.adobe.colorprofile.ColorProfileService;
import com.adobe.colorprofile._ColorProfileServiceStub;
import org.omg.CORBA.*;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.ObjectImpl;
import org.omg.CORBA.portable.OutputStream;

public final class ColorProfileServiceHelper {
    public static void insert(Any any, ColorProfileService s) {
        any.insert_Object(s);
    }

    public static ColorProfileService extract(Any any) {
        return ColorProfileServiceHelper.narrow(any.extract_Object());
    }

    public static TypeCode type() {
        return ORB.init().create_interface_tc("IDL:com/adobe/colorprofile/ColorProfileService:1.0", "ColorProfileService");
    }

    public static String id() {
        return "IDL:com/adobe/colorprofile/ColorProfileService:1.0";
    }

    public static ColorProfileService read(InputStream in) {
        return ColorProfileServiceHelper.narrow(in.read_Object());
    }

    public static void write(OutputStream _out, ColorProfileService s) {
        _out.write_Object(s);
    }

    public static ColorProfileService narrow(java.lang.Object obj) {
        if (obj instanceof ColorProfileService) {
            return (ColorProfileService)obj;
        }
        if (obj instanceof Object) {
            return ColorProfileServiceHelper.narrow((Object)obj);
        }
        throw new BAD_PARAM("Failed to narrow in helper");
    }

    public static ColorProfileService narrow(Object obj) {
        if (obj == null) {
            return null;
        }
        try {
            return (ColorProfileService)obj;
        }
        catch (ClassCastException c) {
            if (obj._is_a("IDL:com/adobe/colorprofile/ColorProfileService:1.0")) {
                _ColorProfileServiceStub stub = new _ColorProfileServiceStub();
                stub._set_delegate(((ObjectImpl)obj)._get_delegate());
                return stub;
            }
            throw new BAD_PARAM("Narrow failed");
        }
    }

    public static ColorProfileService unchecked_narrow(Object obj) {
        if (obj == null) {
            return null;
        }
        try {
            return (ColorProfileService)obj;
        }
        catch (ClassCastException c) {
            _ColorProfileServiceStub stub = new _ColorProfileServiceStub();
            stub._set_delegate(((ObjectImpl)obj)._get_delegate());
            return stub;
        }
    }
}