// Path: src/main/java/j8spec/BlockDefinition.java
// static void visitAll(BlockDefinitionVisitor visitor, Collection<BlockDefinition> blockDefinitions) {
//     for (BlockDefinition blockDefinition : blockDefinitions) {
//         blockDefinition.accept(visitor);
//     }
// }


import j8spec.annotation.DefinedOrder;
import j8spec.annotation.RandomOrder;
import java.util.LinkedList;
import java.util.List;
import static j8spec.BlockExecutionFlag.DEFAULT;
import static j8spec.BlockDefinition.visitAll;
    }

    <T> void addVarInitializer(Var<T> var, UnsafeFunction<T> initFunction) {
        varInitializers.add(new BlockDefinitions.VarInitializer<>(var, initFunction));
    }

    void addBeforeAll(UnsafeBlock beforeAllBlock) {
        hooks.add(new BlockDefinitions.BeforeAll(beforeAllBlock));
    }

    void addBeforeEach(UnsafeBlock beforeEachBlock) {
        hooks.add(new BlockDefinitions.BeforeEach(beforeEachBlock));
    }

    void addAfterEach(UnsafeBlock afterEachBlock) {
        hooks.add(new BlockDefinitions.AfterEach(afterEachBlock));
    }

    void addAfterAll(UnsafeBlock afterAllBlock) {
        hooks.add(new BlockDefinitions.AfterAll(afterAllBlock));
    }

    void addExample(ExampleConfiguration exampleConfig, UnsafeBlock block) {
        blockDefinitions.add(new BlockDefinitions.Example(exampleConfig, block));
    }

    @Override
    public void accept(BlockDefinitionVisitor visitor) {
        visitor.startGroup(config);

// Path: src/main/java/j8spec/BlockDefinition.java
// static void visitAll(BlockDefinitionVisitor visitor, Collection<BlockDefinition> blockDefinitions) {
//     for (BlockDefinition blockDefinition : blockDefinitions) {
//         blockDefinition.accept(visitor);
//     }
// }


// Path: src/main/java/j8spec/ExampleGroupDefinition.java
import j8spec.annotation.DefinedOrder;
import j8spec.annotation.RandomOrder;
import java.util.LinkedList;
import java.util.List;
import static j8spec.BlockExecutionFlag.DEFAULT;
import static j8spec.BlockDefinition.visitAll;

    }

    <T> void addVarInitializer(Var<T> var, UnsafeFunction<T> initFunction) {
        varInitializers.add(new BlockDefinitions.VarInitializer<>(var, initFunction));
    }

    void addBeforeAll(UnsafeBlock beforeAllBlock) {
        hooks.add(new BlockDefinitions.BeforeAll(beforeAllBlock));
    }

    void addBeforeEach(UnsafeBlock beforeEachBlock) {
        hooks.add(new BlockDefinitions.BeforeEach(beforeEachBlock));
    }

    void addAfterEach(UnsafeBlock afterEachBlock) {
        hooks.add(new BlockDefinitions.AfterEach(afterEachBlock));
    }

    void addAfterAll(UnsafeBlock afterAllBlock) {
        hooks.add(new BlockDefinitions.AfterAll(afterAllBlock));
    }

    void addExample(ExampleConfiguration exampleConfig, UnsafeBlock block) {
        blockDefinitions.add(new BlockDefinitions.Example(exampleConfig, block));
    }

    @Override
    public void accept(BlockDefinitionVisitor visitor) {
        visitor.startGroup(config);

        visitAll(visitor, varInitializers);