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);
}
}
Aggregations