public class ObjectFactory
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addExternalClassLoader(java.lang.ClassLoader classLoader)
Adds a custom classloader to the collection of classloaders searched for "external" classes.
|
static void |
addResourceClassLoader(java.lang.ClassLoader classLoader)
Adds a custom classloader to the collection of classloaders searched for resources.
|
static CommentGenerator |
createCommentGenerator(Context context)
Creates a new Object object.
|
static ConnectionFactory |
createConnectionFactory(Context context) |
static java.lang.Object |
createExternalObject(java.lang.String type)
Creates a new Object object.
|
static java.lang.Object |
createInternalObject(java.lang.String type)
Creates a new Object object.
|
static IntrospectedColumn |
createIntrospectedColumn(Context context)
Creates a new Object object.
|
static IntrospectedTable |
createIntrospectedTable(TableConfiguration tableConfiguration,
FullyQualifiedTable table,
Context context)
Creates a new Object object.
|
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).
|
static JavaFormatter |
createJavaFormatter(Context context)
Creates a new Object object.
|
static JavaTypeResolver |
createJavaTypeResolver(Context context,
java.util.List<java.lang.String> warnings)
Creates a new Object object.
|
static Plugin |
createPlugin(Context context,
PluginConfiguration pluginConfiguration)
Creates a new Object object.
|
static XmlFormatter |
createXmlFormatter(Context context)
Creates a new Object object.
|
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.net.URL |
getResource(java.lang.String resource)
Gets the resource.
|
static java.lang.Class<?> |
internalClassForName(java.lang.String type)
Internal class for name.
|
static void |
reset()
Clears the class loaders.
|
public static void reset()
public static void addResourceClassLoader(java.lang.ClassLoader classLoader)
classLoader - the class loaderpublic static void addExternalClassLoader(java.lang.ClassLoader classLoader)
classLoader - the class loaderpublic static java.lang.Class<?> externalClassForName(java.lang.String type)
throws java.lang.ClassNotFoundException
type - the typejava.lang.ClassNotFoundException - the class not found exceptionpublic static java.lang.Object createExternalObject(java.lang.String type)
type - the typepublic static java.lang.Class<?> internalClassForName(java.lang.String type)
throws java.lang.ClassNotFoundException
type - the typejava.lang.ClassNotFoundException - the class not found exceptionpublic static java.net.URL getResource(java.lang.String resource)
resource - the resourcepublic static java.lang.Object createInternalObject(java.lang.String type)
type - the typepublic static JavaTypeResolver createJavaTypeResolver(Context context, java.util.List<java.lang.String> warnings)
context - the contextwarnings - the warningspublic static Plugin createPlugin(Context context, PluginConfiguration pluginConfiguration)
context - the contextpluginConfiguration - the plugin configurationpublic static CommentGenerator createCommentGenerator(Context context)
context - the contextpublic static ConnectionFactory createConnectionFactory(Context context)
public static JavaFormatter createJavaFormatter(Context context)
context - the contextpublic static XmlFormatter createXmlFormatter(Context context)
context - the contextpublic static IntrospectedTable createIntrospectedTable(TableConfiguration tableConfiguration, FullyQualifiedTable table, Context context)
tableConfiguration - the table configurationtable - the tablecontext - the contextpublic static IntrospectedTable createIntrospectedTableForValidation(Context context)
context - the contextpublic static IntrospectedColumn createIntrospectedColumn(Context context)
context - the contextCopyright © 2018. All Rights Reserved.