if (iter.isFilter() != null) { printFilter(iter.isFilter(), outputStream); } if (iter.isPipeline() != null) { printPipe(iter.isPipeline(), outputStream); } if (iter.isSplitJoin() != null) { printSJ(iter.isSplitJoin(), outputStream); } if (iter.isFeedbackLoop() != null) { printFL(iter.isFeedbackLoop(), outputStream); }
printStreamSelector(iter,outputStream);
    public void printStream(Iterator iter)    {        String iterType;        if (iter.isFilter() != null)            {                iterType = "Filter";            }        else if (iter.isPipeline() != null)            {                iterType = "Pipeline";            }        else if (iter.isSplitJoin() != null)            {                iterType = "SplitJoin";            }        else if (iter.isFeedbackLoop() != null)            {                iterType = "FeedbackLoop";            }        else            {                ERROR("Invalid type of an iterator!");                iterType = null;            }        File outputFile;        FileOutputStream fileOutputStream;        DataOutputStream outputStream;        try            {                outputFile = new File(getName(iter) + ".java");                fileOutputStream = new FileOutputStream(outputFile);                outputStream = new DataOutputStream(fileOutputStream);                outputStream.writeBytes("import streamit.*;\n\n");                outputStream.writeBytes(                                        "public class "                                        + getName(iter)                                        + " extends "                                        + iterType                                        + "\n");                outputStream.writeBytes("{\n");                if (iter.isFilter() != null)                    {                        printFilter(iter.isFilter(), outputStream);                    }                if (iter.isPipeline() != null)                    {                        printPipe(iter.isPipeline(), outputStream);                    }                if (iter.isSplitJoin() != null)                    {                        printSJ(iter.isSplitJoin(), outputStream);                    }                if (iter.isFeedbackLoop() != null)                    {                        printFL(iter.isFeedbackLoop(), outputStream);                    }                outputStream.writeBytes("}\n");            }        catch (Throwable e)            {                ERROR(e);            }    }