Annotation Type ProtoFactory
A single constructor or static method is allowed to have this annotation in a ProtoStream marshallable class.
This annotation is not inherited, occurrences in superclass/superinterfaces are ignored for current class.
This annotation can be used support creation of immutable messages (that have final fields or do not have setters). In that case all protobuf fields should be declared with annotations on instance fields or getter methods.
This annotation is not mandatory, but classes that do not have a constructor or static method annotated with this annotation are expected to have an accessible no-argument constructor instead to be used for instantiating the class.
NOTE:
This annotation can be processed at runtime (see ProtoSchemaBuilder
) only if method parameter name
debug information was emitted into the class file by the compiler, ie. the compiler was invoked with the
-parameters flag. Usage of this annotation at compile time is possible regardless of that.
- Since:
- 4.3
- Author:
- [email protected]