public void setInitWork (JMethodDeclaration newWork) { addReplacementMethod(newWork, getInitWork()); getInitPhases()[0].setWork(newWork); checkRep(); }
public void copyState(SIRFilter other) { super.copyState(other); if (!(other instanceof SIRTwoStageFilter)) {       setInitPhases(new SIRWorkFunction[1]); getInitPhases()[0] = new SIRWorkFunction(); }
    private void checkRep() {	// we think the peek-pop difference should be the same in the	// initial and steady states (our simulation routine with the	// scheduler makes this assumption).	Utils.assert(getInitPeek()-getInitPop()==                     getPeekInt()-getPopInt(),		     "\nFor Two Stage Filters, initPeek-initPop must equal peek-pop" +		     "\ninitPeek=" + getInitPeek() + 		     "\ninitPop=" + getInitPop() + 		     "\nPeek=" + getPeekInt() + 		     "\nPop=" + getPopInt());    }    /**     * Sets the work function for the initialization stage.     */    public void setInitWork (JMethodDeclaration newWork) {	addReplacementMethod(newWork, getInitWork());        getInitPhases()[0].setWork(newWork);	checkRep();    }