@Override
  public <T> T read(Class<T> type, Element element) {
    if (!TextAttributes.class.equals(type)) {
      return super.read(type, element);
    }

    TextAttributes attributes = new TextAttributes();
    if (element != null) {
      attributes.setAttributes(
        readChild(Color.class, element, FOREGROUND),
        readChild(Color.class, element, BACKGROUND),
        readChild(Color.class, element, EFFECT_COLOR),
        readChild(Color.class, element, ERROR_STRIPE),
        Effect.read(this, element),
        FontStyle.read(this, element));
    }
    //noinspection unchecked
    return (T)attributes;
  }
@Override
  public <T> T read(Class<T> type, Element element)