org.mybatis.generator.api.dom
Class OutputUtilities

java.lang.Object
  extended by org.mybatis.generator.api.dom.OutputUtilities

public class OutputUtilities
extends Object

Author:
Jeff Butler

Method Summary
static Set<String> calculateImports(Set<FullyQualifiedJavaType> importedTypes)
          returns a unique set of "import xxx;" Strings for the set of types
static void javaIndent(StringBuilder sb, int indentLevel)
          Utility method that indents the buffer by the default amount for Java (four spaces per indent level).
static void newLine(StringBuilder sb)
          Utility method.
static void xmlIndent(StringBuilder sb, int indentLevel)
          Utility method that indents the buffer by the default amount for XML (two spaces per indent level).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

javaIndent

public static void javaIndent(StringBuilder sb,
                              int indentLevel)
Utility method that indents the buffer by the default amount for Java (four spaces per indent level).

Parameters:
sb - a StringBuilder to append to
indentLevel - the required indent level

xmlIndent

public static void xmlIndent(StringBuilder sb,
                             int indentLevel)
Utility method that indents the buffer by the default amount for XML (two spaces per indent level).

Parameters:
sb - a StringBuilder to append to
indentLevel - the required indent level

newLine

public static void newLine(StringBuilder sb)
Utility method. Adds a newline character to a StringBuilder.

Parameters:
sb - the StringBuilder to be appended to

calculateImports

public static Set<String> calculateImports(Set<FullyQualifiedJavaType> importedTypes)
returns a unique set of "import xxx;" Strings for the set of types

Parameters:
importedTypes -
Returns:


Copyright © 2010-2012 MyBatis.org. All Rights Reserved.