private BiPredicate matcherChildNodeProcessor()

in apache-rat-core/src/main/java/org/apache/rat/configuration/XMLConfigurationReader.java [291:314]


    private BiPredicate<Node, Description> matcherChildNodeProcessor(final AbstractBuilder builder, final Description description) {
        return (child, childDescription) -> {
            switch (childDescription.getType()) {
            case LICENSE:
            case BUILD_PARAMETER:
                throw new ConfigurationException(String.format(
                        "%s may not be used as an enclosed matcher.  %s '%s' found in '%s'", childDescription.getType(),
                        childDescription.getType(), childDescription.getCommonName(), description.getCommonName()));
            case MATCHER:
                AbstractBuilder b = parseMatcher(child);
                callSetter(b.getDescription(), builder, b);
                return true;
            case PARAMETER:
                if (!XMLConfig.isInlineNode(description.getCommonName(), childDescription.getCommonName())
                        || childDescription.getChildType() == String.class) {
                    callSetter(childDescription, builder, child.getTextContent());
                } else {
                    callSetter(childDescription, builder, parseMatcher(child));
                }
                return true;
            }
            return false;
        };
    }