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

com.vladsch.flexmark.util.dependency.FlatDependencyHandler Maven / Gradle / Ivy

There is a newer version: 4.15.102
Show newest version
package com.vladsch.flexmark.util.dependency;

import org.jetbrains.annotations.NotNull;

import java.util.List;
import java.util.function.Function;

/**
 * @deprecated use {@link DependencyResolver#resolveFlatDependencies(List, Function, Function)}
 */
@Deprecated
public class FlatDependencyHandler extends DependencyHandler, FlatDependencies> {
    public List resolvedDependencies(List dependentsList) {
        FlatDependencies dependencies = resolveDependencies(dependentsList);
        return dependencies.dependencies;
    }

    @NotNull
    @Override
    protected FlatDependencyStage createStage(List dependents) {
        return new FlatDependencyStage<>(dependents);
    }

    @NotNull
    @Override
    protected Class getDependentClass(T dependent) {
        //noinspection unchecked
        return (Class) dependent.getClass();
    }

    @NotNull
    @Override
    protected FlatDependencies createResolvedDependencies(List> stages) {
        return new FlatDependencies<>(stages);
    }

    public static  List computeDependencies(List dependentsList) {
        FlatDependencyHandler resolver = new FlatDependencyHandler<>();
        return resolver.resolvedDependencies(dependentsList);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy