Search in sources :

Example 1 with ConstantAnalysis

use of org.wildfly.iiop.openjdk.rmi.ConstantAnalysis in project wildfly by wildfly.

the class InterfaceRepository method addConstants.

/**
     * Add a set of constants to a container (interface or value class).
     */
private void addConstants(LocalContainer container, ContainerAnalysis ca) throws RMIIIOPViolationException, IRConstructionException {
    ConstantAnalysis[] consts = ca.getConstants();
    for (int i = 0; i < consts.length; ++i) {
        ConstantDefImpl cDef;
        String cid = ca.getMemberRepositoryId(consts[i].getJavaName());
        String cName = consts[i].getIDLName();
        Class cls = consts[i].getType();
        TypeCode typeCode = getConstantTypeCode(cls);
        Any value = orb.create_any();
        consts[i].insertValue(value);
        cDef = new ConstantDefImpl(cid, cName, "1.0", typeCode, value, container, impl);
        container.add(cName, cDef);
    }
}
Also used : TypeCode(org.omg.CORBA.TypeCode) ConstantAnalysis(org.wildfly.iiop.openjdk.rmi.ConstantAnalysis) Any(org.omg.CORBA.Any)

Aggregations

Any (org.omg.CORBA.Any)1 TypeCode (org.omg.CORBA.TypeCode)1 ConstantAnalysis (org.wildfly.iiop.openjdk.rmi.ConstantAnalysis)1