PassiveNode thePassiveNode = (PassiveNode)(sourcePort.getParent()); Class[] theConsumersAllowed = thePassiveNode.getConsumersAllowed();
    private SingleFlowRateControllable initializeOperations(Class selectedConsumerOrProducerClass) {        SingleFlowRateControllable initializedOperations = null;        myFlowRateType = calculateFlowRateType(selectedConsumerOrProducerClass);        EditorPort sourcePort = (EditorPort)getSourcePort();        EditorPort destPort = (EditorPort)getDestPort();        if (sourcePort.getParent() instanceof ActiveNode){            //we're producing            amProducerEdge = true;            myActiveModule = ((ActiveNode)sourcePort.getParent()).getSimBioModuleImpl();            //do tricky string manipulation to get correct definition            computeSenorAndActutorNames(selectedConsumerOrProducerClass);            Method definitionMethod = getOperationsMethod(selectedConsumerOrProducerClass);            initializedOperations = invokeMethod(myActiveModule, definitionMethod);            return initializedOperations;        }        else if (destPort.getParent() instanceof ActiveNode){            //we're consuming            amProducerEdge = false;            myActiveModule = ((ActiveNode)destPort.getParent()).getSimBioModuleImpl();            PassiveNode thePassiveNode = (PassiveNode)(sourcePort.getParent());            Class[] theConsumersAllowed = thePassiveNode.getConsumersAllowed();            computeSenorAndActutorNames(selectedConsumerOrProducerClass);            Method definitionMethod = getOperationsMethod(selectedConsumerOrProducerClass);            initializedOperations = invokeMethod(myActiveModule, definitionMethod);            return initializedOperations;        }        return initializedOperations;    }