com.vladsch.flexmark.util.dependency.FlatDependencyHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flexmark-util-dependency Show documentation
Show all versions of flexmark-util-dependency Show documentation
flexmark-java dependency utility classes
The newest version!
package com.vladsch.flexmark.util.dependency;
import java.util.List;
import java.util.function.Function;
import org.jetbrains.annotations.NotNull;
/**
* @deprecated use {@link DependencyResolver#resolveFlatDependencies(List, Function, Function)} use
* null for functions if no need for sort or class extractor
*/
@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 extends T> getDependentClass(T dependent) {
return (Class extends T>) 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);
}
}