Class FactoryBase.UtilityFactory<L,​R extends FactoryBase<?,​R>>

    • Constructor Detail

      • UtilityFactory

        public UtilityFactory​(FactoryBase<L,​R> factory)
    • Method Detail

      • getMicroservice

        public Microservice<?,​R,​?> getMicroservice()
      • 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