package com.onsemi.middleware.junit.runtime.sb;

import java.net.URL;
import java.util.Optional;

import com.onsemi.middleware.ue.execeng.main.UEClassLoaderBean;

public class UEClassLoaderBeanJunitSb extends UEClassLoaderBean {

    private MavenPomProcessor mavenPomProcessor;
    public UEClassLoaderBeanJunitSb(Optional<String> iocDependency, MavenPomProcessor mavenPomProcessor) {
        super(iocDependency);
        this.mavenPomProcessor = mavenPomProcessor;
    }

    @Override
    public URL getJcdLiteJarUrl() {
        return null;
    }

    @Override
    public URL[] getInterfaceClassLoaderUrls() {
        return mavenPomProcessor.getRelatedJarUrls();
    }

    @Override
    public ClassLoader getChildFirstGlobalClassLoader() {
        return Thread.currentThread()
                     .getContextClassLoader();
    }
}
