public static Pattern createClassOrPackageNamePattern(String input, boolean forPackage) {
        String inputRegex = convertInputToRegex(input);
        if (forPackage) {
            // cater for any classname and any subpackages in between
            inputRegex += inputRegex.charAt(inputRegex.length() - 1) == '/' ? ".+" : "/.+";
        }
        return Pattern.compile(inputRegex);
    }
Generate regular expression from the given input for filtering classes on the classpath.

@param input either absolute value (with "." as package separator) or glob pattern (with "/" as package separator)
@param forPackage whether the given input identifies a package
@return regular expression to filter classes on classpath by
jsonschema-maven-plugin/src/main/java/com/github/victools/jsonschema/plugin/maven/GlobHandler.java