Package io.github.factoryfx.factory
Class FactoryBase.UtilityFactory<L,R extends FactoryBase<?,R>>
- java.lang.Object
-
- io.github.factoryfx.factory.FactoryBase.UtilityFactory<L,R>
-
- Enclosing class:
- FactoryBase<L,R extends FactoryBase<?,R>>
public static class FactoryBase.UtilityFactory<L,R extends FactoryBase<?,R>> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description UtilityFactory(FactoryBase<L,R> factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends FactoryBase<?,?>>
Tcopy()copy with same ids and dataFactoryTreeBuilder<?,R,?>getFactoryTreeBuilder()Microservice<?,R,?>getMicroservice()RgetRoot()<F extends FactoryBase<L,R>>
voidmock(java.util.function.Function<F,L> creatorMock)overrides the factory creator with a mock
to access the factory attributes you have to specify the factory class like this<F extends FactoryBase<L,R>>
FsemanticCopy()semantic copy can be configured on the attributes, unlike copy which always create complete copy with same ids
-
-
-
Constructor Detail
-
UtilityFactory
public UtilityFactory(FactoryBase<L,R> factory)
-
-
Method Detail
-
getMicroservice
public Microservice<?,R,?> getMicroservice()
-
getFactoryTreeBuilder
public FactoryTreeBuilder<?,R,?> getFactoryTreeBuilder()
-
getRoot
public R getRoot()
-
semanticCopy
public <F extends FactoryBase<L,R>> F semanticCopy()
semantic copy can be configured on the attributes, unlike copy which always create complete copy with same ids- Type Parameters:
F- type- Returns:
- self
-
copy
public <T extends FactoryBase<?,?>> T copy()
copy with same ids and data- Type Parameters:
T- self- Returns:
- scopy
-
mock
public <F extends FactoryBase<L,R>> void mock(java.util.function.Function<F,L> creatorMock)
overrides the factory creator with a mock
to access the factory attributes you have to specify the factory class like this
exampleFactoryA.utility().<Factory>mock(f->f.reference ...- Type Parameters:
F- Factory- Parameters:
creatorMock- mock function, factory as parameter
-
-