protected String createStyleClass(UIInput component, String styleClassProperty, String defaultStyleClass) {
        StringBuilder sb = SharedStringBuilder.get(SB_STYLECLASS, 128);

        if (LangUtils.isNotBlank(defaultStyleClass)) {
            sb.append(defaultStyleClass);
        }

        if (!component.isValid()) {
            sb.append(" ui-state-error");
        }

        if (isDisabled(component)) {
            sb.append(" ui-state-disabled");
        }


        if (LangUtils.isNotBlank(styleClassProperty)) {
            String styleClass = Objects.toString(component.getAttributes().get(styleClassProperty), Constants.EMPTY_STRING);
            if (LangUtils.isNotBlank(styleClass)) {
                sb.append(" ").append(styleClass);
            }
        }

        return sb.toString();
    }
Creates a styleClass for the component which consists of:
1) default style class
2) Error State
3) Disabled State
4) user style class

@param component the {@link UIInput} component to construct styleClass for
@param styleClassProperty eg "styleClass" or "inputStyleClass"
@param defaultStyleClass the default style for the component if any
@return the properly constructed style class string
primefaces/src/main/java/org/primefaces/renderkit/InputRenderer.java