iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/ir/InterfaceRepository.java
private void addOperations(LocalContainer container,
                               ContainerAnalysis ca)
            throws RMIIIOPViolationException, IRConstructionException {
        OperationAnalysis[] ops = ca.getOperations();
        for (int i = 0; i < ops.length; ++i) {
            OperationDefImpl oDef;
            String oName = ops[i].getIDLName();
            String oid = ca.getMemberRepositoryId(oName);

            Class cls = ops[i].getReturnType();
            TypeCode typeCode = getTypeCode(cls);

            ParameterAnalysis[] ps = ops[i].getParameters();
            ParameterDescription[] params = new ParameterDescription[ps.length];
            for (int j = 0; j < ps.length; ++j) {
                params[j] = new ParameterDescription(ps[j].getIDLName(),
                        getTypeCode(ps[j].getCls()),
                        null, // filled in later
                        ParameterMode.PARAM_IN);
            }

            ExceptionAnalysis[] exc = ops[i].getMappedExceptions();
            ExceptionDef[] exceptions = new ExceptionDef[exc.length];
            for (int j = 0; j < exc.length; ++j) {
                ExceptionDefImpl e = addException(exc[j]);
                exceptions[j] = ExceptionDefHelper.narrow(e.getReference());
            }

            oDef = new OperationDefImpl(oid, oName, "1.0", container,
                    typeCode, params, exceptions, impl);
            container.add(oName, oDef);
        }
    }
private void addOperations(LocalContainer container,
                               ContainerAnalysis ca)
            throws RMIIIOPViolationException, IRConstructionException {
        OperationAnalysis[] ops = ca.getOperations();
        for (int i = 0; i < ops.length; ++i) {
            OperationDefImpl oDef;
            String oName = ops[i].getIDLName();
            String oid = ca.getMemberRepositoryId(oName);

            Class cls = ops[i].getReturnType();
            TypeCode typeCode = getTypeCode(cls);

            ParameterAnalysis[] ps = ops[i].getParameters();
            ParameterDescription[] params = new ParameterDescription[ps.length];
            for (int j = 0; j < ps.length; ++j) {
                params[j] = new ParameterDescription(ps[j].getIDLName(),
                        getTypeCode(ps[j].getCls()),
                        null, // filled in later
                        ParameterMode.PARAM_IN);
            }

            ExceptionAnalysis[] exc = ops[i].getMappedExceptions();
            ExceptionDef[] exceptions = new ExceptionDef[exc.length];
            for (int j = 0; j < exc.length; ++j) {
                ExceptionDefImpl e = addException(exc[j]);
                exceptions[j] = ExceptionDefHelper.narrow(e.getReference());
            }

            oDef = new OperationDefImpl(oid, oName, "1.0", container,
                    typeCode, params, exceptions, impl);
            container.add(oName, oDef);
        }
    }
private void addOperations ( LocalContainer container , ContainerAnalysis ca ) throws RMIIIOPViolationException , IRConstructionException { OperationAnalysis [ ] ops = ca . getOperations ( ) ; for ( int i = 0 ; i < ops . length ; ++ i ) { OperationDefImpl oDef ; String oName = ops [ i ] . getIDLName ( ) ; String oid = ca . getMemberRepositoryId ( oName ) ; Class cls = ops [ i ] . getReturnType ( ) ; TypeCode typeCode = getTypeCode ( cls ) ; ParameterAnalysis [ ] ps = ops [ i ] . getParameters ( ) ; ParameterDescription [ ] params = new ParameterDescription [ ps . length ] ; for ( int j = 0 ; j < ps . length ; ++ j ) { params [ j ] = new ParameterDescription ( ps [ j ] . getIDLName ( ) , getTypeCode ( ps [ j ] . getCls ( ) ) , null , // filled in later ParameterMode . PARAM_IN ) ; } ExceptionAnalysis [ ] exc = ops [ i ] . getMappedExceptions ( ) ; ExceptionDef [ ] exceptions = new ExceptionDef [ exc . length ] ; for ( int j = 0 ; j < exc . length ; ++ j ) { ExceptionDefImpl e = addException ( exc [ j ] ) ; exceptions [ j ] = ExceptionDefHelper . narrow ( e . getReference ( ) ) ; } oDef = new OperationDefImpl ( oid , oName , "1.0" , container , typeCode , params , exceptions , impl ) ; container . add ( oName , oDef ) ; } }
Add a set of operations to a container (interface or value class).
Add a set of operations to a container ( interface or value class ) .