CType inType = self.getInputType(); CType outType = self.getOutputType();
CType inType = null; try { inType= self.getInputType(); } catch (RuntimeException x) {  } CType outType = null; try { outType = self.getOutputType(); } catch (RuntimeException x) {  }
    private void printHeader(SIRStream self, String type)    {        CType inType = self.getInputType();        CType outType = self.getOutputType();        // Consider special-case inputs and outputs for feedback loops.        if (self instanceof SIRFeedbackLoop)            {                SIRFeedbackLoop fl = (SIRFeedbackLoop)self;                SIRJoiner joiner = fl.getJoiner();                if (joiner.getType() == SIRJoinType.NULL ||                    (joiner.getType() == SIRJoinType.WEIGHTED_RR &&                     joiner.getWeight(0) == 0))                    inType = CStdType.Void;                SIRSplitter splitter = fl.getSplitter();                if (splitter.getType() == SIRSplitType.NULL ||                    (splitter.getType() == SIRSplitType.WEIGHTED_RR &&                     splitter.getWeight(0) == 0))                    outType = CStdType.Void;            }        if (inType != null && outType != null)            {                printType(inType);                p.print("->");                printType(outType);                p.print(" ");            }        p.print(type);        if (self.getIdent() != null)            {                // if the parent is null, this is the top-level stream;                // there is only one of it, so print its [non-unique]                // ident rather than its [unique] name so the class name                // matches the filename                if (self.getParent() == null)                    p.print(" " + self.getIdent());                else                    p.print(" " + self.getName());            }        // In SIR, streams don't have parameter lists, but their        // init functions do.  Print a parameter list.        JMethodDeclaration init = self.getInit();        JFormalParameter[] parameters = init.getParameters();        if (parameters.length > 0)            {                p.print("(");                boolean first = true;                            for (int i = 0; i < parameters.length; i++) {                    if (!first)                        p.print(", ");                    first = false;                    parameters[i].accept(this);                }                p.print(")");            }                p.newLine();    }