}
}
}
}
CPO lattice = TypeLattice.lattice();
Object[] portTypeArray = portTypeList.toArray();
result = (Type) lattice.greatestLowerBound(portTypeArray);
} else if (isOutput()) {
// is a transparent output port. Get all the ports connected
// on the inside through deepInsidePortList().
Iterator ports = deepInsidePortList().iterator();
List portTypeList = new LinkedList();
while (ports.hasNext()) {
TypedIOPort port = (TypedIOPort) ports.next();
// Rule out case where this port itself is listed...
if ((port != this) && port.isOutput()) {
portTypeList.add(port.getType());
}
}
CPO lattice = TypeLattice.lattice();
Object[] portTypeArray = portTypeList.toArray();
result = (Type) lattice.leastUpperBound(portTypeArray);
}
return result;
} finally {
_workspace.doneReading();