public class ObjectFactory extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addExternalClassLoader(ClassLoader classLoader)
Adds a custom classloader to the collection of classloaders searched for "external" classes.
|
static void |
addResourceClassLoader(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 Object |
createExternalObject(String type)
Creates a new Object object.
|
static Object |
createInternalObject(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,
List<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 Class<?> |
externalClassForName(String type)
This method returns a class loaded from the context classloader, or the classloader supplied by a client.
|
static URL |
getResource(String resource)
Gets the resource.
|
static Class<?> |
internalClassForName(String type)
Internal class for name.
|
public static void addResourceClassLoader(ClassLoader classLoader)
classLoader - the class loaderpublic static void addExternalClassLoader(ClassLoader classLoader)
classLoader - the class loaderpublic static Class<?> externalClassForName(String type) throws ClassNotFoundException
type - the typeClassNotFoundException - the class not found exceptionpublic static Object createExternalObject(String type)
type - the typepublic static Class<?> internalClassForName(String type) throws ClassNotFoundException
type - the typeClassNotFoundException - the class not found exceptionpublic static URL getResource(String resource)
resource - the resourcepublic static Object createInternalObject(String type)
type - the typepublic static JavaTypeResolver createJavaTypeResolver(Context context, List<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 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 © 2006–2016 MyBatis.org. All rights reserved.