Class JavaDomUtils

java.lang.Object
org.mybatis.generator.api.dom.java.JavaDomUtils

public class JavaDomUtils extends Object
  • Constructor Details

    • JavaDomUtils

      private JavaDomUtils()
  • Method Details

    • calculateTypeName

      public static String calculateTypeName(CompilationUnit compilationUnit, FullyQualifiedJavaType fqjt)
      Calculates type names for writing into generated Java. We try to use short names wherever possible. If the type requires an import, but has not been imported, then we need to use the fully qualified type name.
      Parameters:
      compilationUnit - the compilation unit being written
      fqjt - the type in question
      Returns:
      the full type name
    • calculateParameterizedTypeName

      private static String calculateParameterizedTypeName(CompilationUnit compilationUnit, FullyQualifiedJavaType fqjt)
    • typeDoesNotRequireImport

      private static boolean typeDoesNotRequireImport(FullyQualifiedJavaType fullyQualifiedJavaType)
    • typeIsInSamePackage

      private static boolean typeIsInSamePackage(CompilationUnit compilationUnit, FullyQualifiedJavaType fullyQualifiedJavaType)
    • typeIsAlreadyImported

      private static boolean typeIsAlreadyImported(CompilationUnit compilationUnit, FullyQualifiedJavaType fullyQualifiedJavaType)