Package de.simonkerstan.ee.core.di.graph
Class ConstructorBeanCreationInformation
java.lang.Object
de.simonkerstan.ee.core.di.graph.ConstructorBeanCreationInformation
- All Implemented Interfaces:
BeanCreationInformation
public final class ConstructorBeanCreationInformation
extends Object
implements BeanCreationInformation
Necessary information for bean creation (when using a constructor).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBean(Object... parameters) Create a bean instance with the given parameters.Class<?>[]Get the dependencies of the bean.of(ConstructorBeanCreationInformation creationInformation, boolean singleton) Create a new instance ofConstructorBeanCreationInformationfrom an existing one.
-
Constructor Details
-
ConstructorBeanCreationInformation
public ConstructorBeanCreationInformation()
-
-
Method Details
-
of
public static ConstructorBeanCreationInformation of(ConstructorBeanCreationInformation creationInformation, boolean singleton) Create a new instance ofConstructorBeanCreationInformationfrom an existing one.- Parameters:
creationInformation- Existing instancesingleton-trueif the bean should be a singleton,falseotherwise- Returns:
- New instance
-
getDependencies
Description copied from interface:BeanCreationInformationGet the dependencies of the bean.- Specified by:
getDependenciesin interfaceBeanCreationInformation- Returns:
- Dependencies of the bean
-
createBean
Description copied from interface:BeanCreationInformationCreate a bean instance with the given parameters. This method is allowed to only create a bean instance one-time and reuse it for all following calls.- Specified by:
createBeanin interfaceBeanCreationInformation- Parameters:
parameters- Parameters to be used for bean creation- Returns:
- Bean instance
-