use of org.omg.CORBA.ExceptionDef in project wildfly by wildfly.
the class InterfaceRepository method addOperations.
/**
* Add a set of operations to a container (interface or value class).
*/
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()), // filled in later
null, 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);
}
}
Aggregations