private void showSequence(DSequence dseq, PrintWriter pw, boolean addName, String rootName, boolean newLine) { if (rootName != null) rootName += "." + dseq.getEncodedName(); else rootName = dseq.getEncodedName(); pw.println(toASCIIFlatName(dseq, rootName)); for (int row = 0; row < dseq.getRowCount(); row++) { Vector v = dseq.getRow(row); int j = 0; for (Enumeration e2 = v.elements(); e2.hasMoreElements();) { BaseType ta = (BaseType) e2.nextElement(); if (j > 0) pw.print(", "); toASCII(ta, pw, false, rootName, false); j++; } pw.println(""); } if (newLine) pw.print("\n"); }
os.print(space + "} " + getEncodedName()); if (print_semi) os.println(";");
/** * Checks for internal consistency. For <code>DSequence</code>, verify that * the variables have unique names. * * @param all for complex constructor types, this flag indicates whether to * check the semantics of the member variables, too. * @throws BadSemanticsException if semantics are bad, explains why. * @see BaseType#checkSemantics(boolean) */ public void checkSemantics(boolean all) throws BadSemanticsException { super.checkSemantics(all); Util.uniqueNames(varTemplate, getEncodedName(), getTypeName()); if (all) { for (Enumeration e = varTemplate.elements(); e.hasMoreElements();) { BaseType bt = (BaseType) e.nextElement(); bt.checkSemantics(true); } } }
static void showSequence( DSequence seq, PrintWriter out, String space) { int nrows = seq.getRowCount(); out.println(space + seq.getEncodedName() + " ("+seq.getClass().getName()+")"); String nspace = space + " "; // for sequences, gotta look at the _rows_ (!) if (nrows > 0) { out.println(nspace + "Vector["+nrows+"] allvalues; show first:"); Vector v = seq.getRow(0); for (int i = 0; i < v.size(); i++) { BaseType bt = (BaseType) v.elementAt(i); showBT( bt, out, nspace+" "); } } }