private Port createPort(Element element) { Port port = IrFactory.eINSTANCE.createPort(); port.setId(element.getAttribute("id")); port.setName(element.getAttribute("name")); port.setType(createType(getChild(element, "Type"))); return port; }
private Port findPort(AbstractActor actor, String portName, boolean output) { List<Port> ports = output ? actor.getOutputPorts() : actor.getInputPorts(); for (Port port : ports) { if (port.getName().equals(portName)) return port; } assert (false); return null; }