// Path: spockito-table/src/main/java/org/tools4j/spockito/table/InjectionContext.java
// enum Phase {
//     /**
//      * Initialisation phase if injection is triggered at initialisation time, for instance when using the Junit-5
//      * {@code SpockitoExtension}, when using {@link SpockitoData} or when directly invoking
//      * {@link SpockitoAnnotations#initData(Object)}.
//      */
//     INIT,
//     /**
//      * Test phase if injection is triggered via a test framework such as junit when invoking the test.
//      */
//     TEST
// }


import java.util.HashSet;
import java.util.Set;
import org.tools4j.spockito.table.InjectionContext.Phase;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Arrays;
    private static void initDataFields(final Object instance, final Class<?> clazz) {
        if (clazz == null || clazz == Object.class) {
            return;
        }
        for (final Field field : clazz.getDeclaredFields()) {
            final Data data = annotationDirectOrMeta(field, Data.class);
            if (data != null) {
                initDataField(instance, field, data);
            }
        }
        initDataFields(instance, clazz.getSuperclass());
    }

    private static void invokeDataMethods(final Object instance, final Class<?> clazz) {
        if (clazz == null || clazz == Object.class) {
            return;
        }
        for (final Method method : clazz.getDeclaredMethods()) {
            final Data data = annotationDirectOrMeta(method, Data.class);
            if (data != null) {
                invokeDataMethod(instance, method, data);
            }
        }
        invokeDataMethods(instance, clazz.getSuperclass());
    }

    private static void initDataField(final Object instance, final Field field, final Data data) {
        final boolean accessible = field.isAccessible();
        try {
            final DataProvider dataProvider = data.value().newInstance();
// Path: spockito-table/src/main/java/org/tools4j/spockito/table/InjectionContext.java
// enum Phase {
//     /**
//      * Initialisation phase if injection is triggered at initialisation time, for instance when using the Junit-5
//      * {@code SpockitoExtension}, when using {@link SpockitoData} or when directly invoking
//      * {@link SpockitoAnnotations#initData(Object)}.
//      */
//     INIT,
//     /**
//      * Test phase if injection is triggered via a test framework such as junit when invoking the test.
//      */
//     TEST
// }


// Path: spockito-table/src/main/java/org/tools4j/spockito/table/SpockitoAnnotations.java
import java.util.HashSet;
import java.util.Set;
import org.tools4j.spockito.table.InjectionContext.Phase;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Arrays;

    private static void initDataFields(final Object instance, final Class<?> clazz) {
        if (clazz == null || clazz == Object.class) {
            return;
        }
        for (final Field field : clazz.getDeclaredFields()) {
            final Data data = annotationDirectOrMeta(field, Data.class);
            if (data != null) {
                initDataField(instance, field, data);
            }
        }
        initDataFields(instance, clazz.getSuperclass());
    }

    private static void invokeDataMethods(final Object instance, final Class<?> clazz) {
        if (clazz == null || clazz == Object.class) {
            return;
        }
        for (final Method method : clazz.getDeclaredMethods()) {
            final Data data = annotationDirectOrMeta(method, Data.class);
            if (data != null) {
                invokeDataMethod(instance, method, data);
            }
        }
        invokeDataMethods(instance, clazz.getSuperclass());
    }

    private static void initDataField(final Object instance, final Field field, final Data data) {
        final boolean accessible = field.isAccessible();
        try {
            final DataProvider dataProvider = data.value().newInstance();
            final InjectionContext context = InjectionContext.create(Phase.INIT, field);