public class BasicNewObjectInstanceFactory extends Object implements Factory<Object>
create()
is invoked.Constructor and Description |
---|
BasicNewObjectInstanceFactory(Class<?> clazz)
Construct a basic new object instance Factory.
|
Modifier and Type | Method and Description |
---|---|
Object |
create()
Create a new instance of the type specified during construction of this Factory.
|
static Factory<Object> |
findBeanFactory(Class<?> clazz) |
public BasicNewObjectInstanceFactory(Class<?> clazz) throws IllegalArgumentException
clazz
- The type of Object the Factory should create new instances of.IllegalArgumentException
- If the specified clazz is deemed illegal. For example, if it is null.public Object create() throws ObjectCreationException
create
in interface Factory<Object>
ObjectCreationException
- If an instance of the type cannot be constructed, perhaps due to it not having a no-arg constructor.Copyright © 2010–2020 meanbean. All rights reserved.