public class

ObjectFactory

extends Object
java.lang.Object
   ↳ org.mybatis.generator.internal.ObjectFactory

Class Overview

This class creates the different object needed by the generator

Summary

Public Methods
static CommentGenerator createCommentGenerator(Context context)
static Object createExternalObject(String type)
static Object createInternalObject(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, List<String> warnings)
static Plugin createPlugin(Context context, PluginConfiguration pluginConfiguration)
static Class<?> externalClassForName(String type)
This method returns a class loaded from the context classloader, or the classloader supplied by a client.
static Class<?> internalClassForName(String type)
synchronized static void setExternalClassLoader(ClassLoader classLoader)
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static CommentGenerator createCommentGenerator (Context context)

public static Object createExternalObject (String type)

public static Object createInternalObject (String type)

public static IntrospectedColumn createIntrospectedColumn (Context context)

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

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).

public static JavaTypeResolver createJavaTypeResolver (Context context, List<String> warnings)

public static Plugin createPlugin (Context context, PluginConfiguration pluginConfiguration)

public static Class<?> externalClassForName (String type)

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.

Returns
  • the Class loaded from the external classloader
Throws
ClassNotFoundException

public static Class<?> internalClassForName (String type)

Throws
ClassNotFoundException

public static synchronized void setExternalClassLoader (ClassLoader classLoader)