org.mybatis.generator.internal
Class ObjectFactory

java.lang.Object
  extended by org.mybatis.generator.internal.ObjectFactory

public class ObjectFactory
extends java.lang.Object

This class creates the different object needed by the generator

Author:
Jeff Butler

Method Summary
static CommentGenerator createCommentGenerator(Context context)
           
static java.lang.Object createExternalObject(java.lang.String type)
           
static java.lang.Object createInternalObject(java.lang.String type)
           
static IntrospectedColumn createIntrospectedColumn(Context context)
           
static IntrospectedTable createIntrospectedTable(TableConfiguration tableConfiguration, FullyQualifiedTable table, Context context)
           
static IntrospectedTable createIntrospectedTableForValidation(Context context)
          This method creates an introspected table implementation that is only usable for validation (i.e.
static JavaTypeResolver createJavaTypeResolver(Context context, java.util.List<java.lang.String> warnings)
           
static Plugin createPlugin(Context context, PluginConfiguration pluginConfiguration)
           
static java.lang.Class<?> externalClassForName(java.lang.String type)
          This method returns a class loaded from the context classloader, or the classloader supplied by a client.
static java.lang.Class<?> internalClassForName(java.lang.String type)
           
static void setExternalClassLoader(java.lang.ClassLoader classLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setExternalClassLoader

public static void setExternalClassLoader(java.lang.ClassLoader classLoader)

externalClassForName

public static java.lang.Class<?> externalClassForName(java.lang.String type)
                                               throws java.lang.ClassNotFoundException
This method returns a class loaded from the context classloader, or the classloader supplied by a client. This is appropriate for JDBC drivers, model root classes, etc. It is not appropriate for any class that extends one of the supplied classes or interfaces.

Parameters:
type -
Returns:
the Class loaded from the external classloader
Throws:
java.lang.ClassNotFoundException

createExternalObject

public static java.lang.Object createExternalObject(java.lang.String type)

internalClassForName

public static java.lang.Class<?> internalClassForName(java.lang.String type)
                                               throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

createInternalObject

public static java.lang.Object createInternalObject(java.lang.String type)

createJavaTypeResolver

public static JavaTypeResolver createJavaTypeResolver(Context context,
                                                      java.util.List<java.lang.String> warnings)

createPlugin

public static Plugin createPlugin(Context context,
                                  PluginConfiguration pluginConfiguration)

createCommentGenerator

public static CommentGenerator createCommentGenerator(Context context)

createIntrospectedTable

public static IntrospectedTable createIntrospectedTable(TableConfiguration tableConfiguration,
                                                        FullyQualifiedTable table,
                                                        Context context)

createIntrospectedTableForValidation

public static IntrospectedTable createIntrospectedTableForValidation(Context context)
This method creates an introspected table implementation that is only usable for validation (i.e. for a context to determine if the target is ibatis2 or mybatis3).

Parameters:
context -
Returns:

createIntrospectedColumn

public static IntrospectedColumn createIntrospectedColumn(Context context)