public class DefaultObjectFactory extends Object implements ObjectFactory, Serializable
Constructor and Description |
---|
DefaultObjectFactory() |
Modifier and Type | Method and Description |
---|---|
<T> T |
create(Class<T> type)
Creates a new object with default constructor.
|
<T> T |
create(Class<T> type,
List<Class<?>> constructorArgTypes,
List<Object> constructorArgs)
Creates a new object with the specified constructor and params.
|
<T> boolean |
isCollection(Class<T> type)
Returns true if this object can have a set of other objects.
|
protected Class<?> |
resolveInterface(Class<?> type) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setProperties
public <T> T create(Class<T> type)
ObjectFactory
create
in interface ObjectFactory
T
- the generic typetype
- Object typepublic <T> T create(Class<T> type, List<Class<?>> constructorArgTypes, List<Object> constructorArgs)
ObjectFactory
create
in interface ObjectFactory
T
- the generic typetype
- Object typeconstructorArgTypes
- Constructor argument typesconstructorArgs
- Constructor argument valuespublic <T> boolean isCollection(Class<T> type)
ObjectFactory
isCollection
in interface ObjectFactory
T
- the generic typetype
- Object typeCopyright © 2009–2021 MyBatis.org. All rights reserved.