class HtmlStylerBase<T> implements HtmlStyler<T> {

    @Override
    public T getStyleable(Object item) {<FILL_FUNCTION_BODY>}

    public abstract String getStyle(T item);
}

        try {
            //noinspection unchecked
            return (T) item;
        } catch (Throwable ignored) {
            return null;
        }
    
<no_super_class>