package io.papermc.paper.plugin.entrypoint.classloader.group;

import io.papermc.paper.plugin.provider.classloader.ClassLoaderAccess;
import io.papermc.paper.plugin.provider.classloader.ConfiguredPluginClassLoader;
import org.jetbrains.annotations.ApiStatus;

import java.util.List;

@ApiStatus.Internal
public class StaticPluginClassLoaderGroup extends SimpleListPluginClassLoaderGroup {

    private final ClassLoaderAccess access;

    public StaticPluginClassLoaderGroup(List<ConfiguredPluginClassLoader> classloaders, ClassLoaderAccess access) {
        super(classloaders);
        this.access = access;
    }

    @Override
    public ClassLoaderAccess getAccess() {
        return this.access;
    }

    @Override
    public String toString() {
        return "StaticPluginClassLoaderGroup{" +
            "access=" + this.access +
            ", classloaders=" + this.classloaders +
            '}';
    }
}
