public interface ObjectFactory
| Modifier and Type | Method and Description |
|---|---|
default <T> T |
build(Class<T> clazz)
Build object of selected
clazz. |
default <T> T |
build(Init<T> context)
Build object with parameters selected in context.
|
<T> ObjectContext<T> |
buildContext(Init<T> context)
Build object of
clazz type. |
default <T> T build(Class<T> clazz) throws NewInstanceException
clazz.T - type of new object.clazz - class of object to be build.NewInstanceException - if there was error while object creating.default <T> T build(Init<T> context) throws NewInstanceException
context - context to constract.NewInstanceException - if there was error while object creating.<T> ObjectContext<T> buildContext(Init<T> context) throws NewInstanceException
clazz type.context - context to constract.NewInstanceException - if there was error while object creating.Copyright © 2020. All rights reserved.