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

cdc.mf.checks.nodes.packages.DefaultPackagesChecker Maven / Gradle / Ivy

The newest version!
package cdc.mf.checks.nodes.packages;

import java.util.List;

import cdc.issues.checks.AbstractPartsChecker;
import cdc.issues.checks.SnapshotManager;
import cdc.issues.locations.LocatedObject;
import cdc.mf.model.MfPackage;
import cdc.mf.model.MfPackageOwner;
import cdc.mf.model.MfQNameItem;

public class DefaultPackagesChecker extends AbstractPartsChecker {
    public static final String KEY = "DefaultPackagesChecker";

    public DefaultPackagesChecker(SnapshotManager manager) {
        super(manager,
              MfPackageOwner.class,
              MfPackage.class,
              new DefaultPackageChecker(manager));
        manager.register(KEY, this);
    }

    @Override
    protected List> getParts(MfPackageOwner object) {
        final List delegates = object.getPackages()
                                                .stream()
                                                .sorted(MfQNameItem.QNAME_COMPARATOR)
                                                .toList();
        return LocatedObject.locate(delegates);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy