protected static void validate(final String name) {
        if (name.isEmpty())
            throw new TopologyException("Name is illegal, it can't be empty");
        if (name.equals(".") || name.equals(".."))
            throw new TopologyException("Name cannot be \".\" or \"..\"");
        if (name.length() > MAX_NAME_LENGTH)
            throw new TopologyException("Name is illegal, it can't be longer than " + MAX_NAME_LENGTH +
                    " characters, name: " + name);
        if (!containsValidPattern(name))
            throw new TopologyException("Name \"" + name + "\" is illegal, it contains a character other than " +
                    "ASCII alphanumerics, '.', '_' and '-'");
    }
Create a Named instance with provided name.

@param name  the processor name to be used. If {@code null} a default processor name will be generated.
@return      A new {@link Named} instance configured with name

@throws TopologyException if an invalid name is specified; valid characters are ASCII alphanumerics, '.', '_' and '-'.
streams/src/main/java/org/apache/kafka/streams/kstream/Named.java