All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.khasanof.collector.questMethod.SyncSearchMethod Maven / Gradle / Ivy

There is a newer version: 1.2.2
Show newest version
package org.khasanof.collector.questMethod;

import lombok.extern.slf4j.Slf4j;
import org.khasanof.collector.GenericMethodContext;
import org.khasanof.context.FluentContextHolder;
import org.khasanof.enums.HandleClasses;
import org.khasanof.executors.matcher.CompositeMatcher;
import org.khasanof.model.InvokerResult;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;
import java.util.Map;

/**
 * @author Nurislom
 * @see org.khasanof.collector.questMethod
 * @since 12/9/2023 8:11 PM
 */
@Slf4j
//@Component
public class SyncSearchMethod implements DefaultSearchMethod {

    private final GenericMethodContext> methodContext;
    private final CompositeMatcher matcher;

    public SyncSearchMethod(GenericMethodContext> methodContext, CompositeMatcher matcher) {
        this.methodContext = methodContext;
        this.matcher = matcher;
    }

    @Override
    public boolean contains(HandleClasses handleClasses) {
        return methodContext.containsKey(handleClasses);
    }

    @Override
    public InvokerResult getMethodValueAnn(Object value, HandleClasses type) {
        log.info("contextHolder.getCurrentUpdate() = " + FluentContextHolder.getCurrentUpdate());
        System.out.printf("Enter type - %s, value - %s \n", type, value);
        if (type.isHasSubType()) {
            if (contains(type)) {

            }
        } else {

        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy