Can you explain your question a bit more? I am just trying to follow the patterns from elsewhere in the code. See for example: SearchStats.java : public static Stats readStats(StreamInput in).