Search in sources :

Example 1 with ValueDef

use of org.omg.CORBA.ValueDef in project wildfly by wildfly.

the class ValueDefImpl method allDone.

public void allDone() throws IRConstructionException {
    getReference();
    delegate.allDone();
    if (baseValueTypeCode != null && baseValueTypeCode.kind() != TCKind.tk_null) {
        try {
            baseValue = baseValueTypeCode.id();
        } catch (BadKind ex) {
            throw IIOPLogger.ROOT_LOGGER.badKindForSuperValueType(id());
        }
        Contained c = repository.lookup_id(baseValue);
        base_value_ref = ValueDefHelper.narrow(c);
    } else
        // TODO: is this right?
        baseValue = "IDL:omg.org/CORBA/ValueBase:1.0";
    // Resolve supported interfaces
    supported_interfaces_ref = new InterfaceDef[supported_interfaces.length];
    for (int i = 0; i < supported_interfaces.length; ++i) {
        InterfaceDef iDef = InterfaceDefHelper.narrow(repository.lookup_id(supported_interfaces[i]));
        if (iDef == null)
            throw IIOPLogger.ROOT_LOGGER.errorResolvingRefToImplementedInterface(id(), supported_interfaces[i]);
        supported_interfaces_ref[i] = iDef;
    }
    // Resolve abstract base valuetypes
    abstract_base_valuetypes_ref = new ValueDef[abstract_base_valuetypes.length];
    for (int i = 0; i < abstract_base_valuetypes.length; ++i) {
        ValueDef vDef = ValueDefHelper.narrow(repository.lookup_id(abstract_base_valuetypes[i]));
        if (vDef == null)
            throw IIOPLogger.ROOT_LOGGER.errorResolvingRefToAbstractValuetype(id(), abstract_base_valuetypes[i]);
        abstract_base_valuetypes_ref[i] = vDef;
    }
}
Also used : Contained(org.omg.CORBA.Contained) InterfaceDef(org.omg.CORBA.InterfaceDef) ValueDef(org.omg.CORBA.ValueDef) BadKind(org.omg.CORBA.TypeCodePackage.BadKind)

Aggregations

Contained (org.omg.CORBA.Contained)1 InterfaceDef (org.omg.CORBA.InterfaceDef)1 BadKind (org.omg.CORBA.TypeCodePackage.BadKind)1 ValueDef (org.omg.CORBA.ValueDef)1