protected void println(String text) { out.println(text); }
/** * Produce an XML processing instruction in the output. * For example: * <pre> * mkp.pi("xml-stylesheet":[href:"mystyle.css", type:"text/css"]) * </pre> * * @param args a map with a single entry whose key is the name of the * processing instruction and whose value is the attributes * for the processing instruction. */ void pi(Map<String, Map<String, Object>> args) { Iterator<Map.Entry<String, Map<String, Object>>> iterator = args.entrySet().iterator(); if (iterator.hasNext()) { Map.Entry<String, Map<String, Object>> mapEntry = iterator.next(); createNode("?" + mapEntry.getKey(), mapEntry.getValue()); state = 2; out.println("?>"); } }
/** * Prints a string followed by an end of line character. * * @param text String to be written */ public void println(String text) { try { if(autoIndent) printIndent(); out.write(text); println(); } catch(IOException ioe) { throw new GroovyRuntimeException(ioe); } }
protected void printList(List list) { if (list.isEmpty()) { out.println(""); } else { out.println(" {"); out.incrementIndent(); for (Object value : list) { if (value instanceof Node) { print((Node) value); } else { out.printIndent(); out.println(InvokerHelper.toString(value)); } } out.decrementIndent(); out.printIndent(); out.println("}"); } }
protected void printLineEnd(String comment) { if (comment != null) { out.print(" <!-- "); out.print(comment); out.print(" -->"); } out.println(); out.flush(); }
public void print(Node node) { out.printIndent(); printName(node); Map attributes = node.attributes(); boolean hasAttributes = attributes != null && !attributes.isEmpty(); if (hasAttributes) { printAttributes(attributes); } Object value = node.value(); if (value instanceof List) { if (!hasAttributes) { out.print("()"); } printList((List) value); } else { if (value instanceof String) { out.print("('"); out.print((String) value); out.println("')"); } else { out.println("()"); } } out.flush(); }
protected void println(final String text) { out.println(text); }
nospace = false; } else { out.println(); out.incrementIndent(); out.printIndent(); case 2: if (!nodeIsEmpty) { out.println(); out.incrementIndent(); out.printIndent(); nospace = false; } else { out.println(); out.printIndent(); nospace = false; } else { out.println(); out.decrementIndent(); out.printIndent();
protected void println(String text) { out.println(text); }
protected void println(String text) { out.println(text); }
protected void println(String text) { out.println(text); }
protected void println(String text) { out.println(text); }
protected void println(final String text) { out.println(text); }
public void println(String text) { out.print(text); println(); }
public void println(String text) { out.print(text); println(); }
/** * Prints a string followed by an end of line character. * * @param text String to be written */ public void println(String text) { try { out.write(text); println(); } catch(IOException ioe) { throw new GroovyRuntimeException(ioe); } }
protected void printLineEnd(String comment) { if (comment != null) { out.print(" <!-- "); out.print(comment); out.print(" -->"); } out.println(); out.flush(); }
protected void printLineEnd(String comment) { if (comment != null) { out.print(" <!-- "); out.print(comment); out.print(" -->"); } out.println(); out.flush(); }
protected void printLineEnd(String comment) { if (comment != null) { out.print(" <!-- "); out.print(comment); out.print(" -->"); } out.println(); out.flush(); }
protected void printLineEnd(String comment) { if (comment != null) { out.print(" <!-- "); out.print(comment); out.print(" -->"); } out.println(); out.flush(); }