Annotation Type ProtoClass


  • @Target(TYPE)
    @Retention(SOURCE)
    public @interface ProtoClass
    Map between a domain class to a protobuf generated class. The annotated class is the domain class
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.Class<? extends com.google.protobuf.Message> protoClass  
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean blacklist
      "whitelist" mode means that each field that we want to map from protobuf message need to marked with ProtoField annotation.
      java.lang.Class<? extends Mapper> mapper
      Deprecated.
      boolean withInheritedFields
      Consider annotated fields in super classes as well.
    • Element Detail

      • protoClass

        java.lang.Class<? extends com.google.protobuf.Message> protoClass
        Returns:
        The class generated from the protobuf message
      • mapper

        @Deprecated
        java.lang.Class<? extends Mapper> mapper
        Deprecated.
        By default, use other annotations for mapping, for example ProtoField If return a mapper then the mapper is responsible for the conversion between the domain class and the protobuf generated class
        Returns:
        mapper better domain class and protobuf generated class
        Default:
        org.silbertb.proto.domainconverter.custom.NullMapper.class
      • withInheritedFields

        boolean withInheritedFields
        Consider annotated fields in super classes as well. The default is false.
        Returns:
        If true then annotated field in super classes will be considered.
        Default:
        false
      • blacklist

        boolean blacklist
        "whitelist" mode means that each field that we want to map from protobuf message need to marked with ProtoField annotation. "blacklist" mode means that each field is mapped by default as if it was annotated with empty ProtoField. The default can be changed using of the other field annotations and specifically by using ProtoIgnore which means that the annotated field is not mapped at all.
        Returns:
        false for "whitelist" mode and true for "blacklist" mode
        Default:
        false