private boolean matches()

in src/main/java/org/apache/maven/plugins/toolchain/jdk/SelectJdkToolchainMojo.java [233:249]


    private boolean matches(ToolchainPrivate tc, Map<String, String> requirements) {
        ToolchainModel model = tc.getModel();
        for (Map.Entry<String, String> req : requirements.entrySet()) {
            String key = req.getKey();
            String reqVal = req.getValue();
            String tcVal = model.getProvides().getProperty(key);
            if (tcVal == null) {
                getLog().debug("Toolchain " + tc + " is missing required property: " + key);
                return false;
            }
            if (!matches(key, reqVal, tcVal)) {
                getLog().debug("Toolchain " + tc + " doesn't match required property: " + key);
                return false;
            }
        }
        return true;
    }