Is it possible to configure protocol buffers / protostuff to not generate the default empty constructor for a message?

390 Views Asked by At

I noticed that protocol buffers / protostuff generate the Java default no-argument constructor when there are required fields. Is there a way to instrument it to not do it for a specific message?

Example

message Response {
  required ErrorCode errorCode;
  repeated Data;
}

I would like it to generate only one constructor

public Response(ErrorCode errorCode) {};
0

There are 0 best solutions below