protected void encodeMarkup(FacesContext context, InputMask component) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        String clientId = component.getClientId(context);
        String styleClass = createStyleClass(component, InputMask.STYLE_CLASS);

        writer.startElement("input", null);
        writer.writeAttribute("id", clientId, null);
        writer.writeAttribute("name", clientId, null);
        writer.writeAttribute("type", component.getType(), "text");

        String valueToRender = ComponentUtils.getValueToRender(context, component);
        if (valueToRender != null) {
            writer.writeAttribute("value", valueToRender, null);
        }

        renderAccessibilityAttributes(context, component);
        renderPassThruAttributes(context, component, HTML.INPUT_TEXT_ATTRS_WITHOUT_EVENTS);
        renderDomEvents(context, component, HTML.INPUT_TEXT_EVENTS);

        if (component.getStyle() != null) {
            writer.writeAttribute("style", component.getStyle(), "style");
        }

        writer.writeAttribute("class", styleClass, "styleClass");

        renderValidationMetadata(context, component);

        writer.endElement("input");
    }
Checks if the given mask string contains any optional mask characters.
In this context, an optional mask character is defined as either '[' or ']'.

@param mask the mask string to check
@return {@code true} if the mask contains either '[' or ']'; {@code false} otherwise
primefaces/src/main/java/org/primefaces/component/inputmask/InputMaskRenderer.java