public ResourcePatternFilter toFilter() {
        return new ResourcePatternFilter(resourceType, name, patternType);
    }
@return a filter which matches only this pattern.
clients/src/main/java/org/apache/kafka/common/resource/ResourcePattern.java