I have a couple of ideas how to fix it, but they require moving toXContent from builder to the object (we already have ToXContent interface for that) and we would also need to change builder to implement a new BuilderFromXContent<T> interface with non-static fromXContent method. These are not difficult changes but it would be nice to implement them globally.