Interface MessageVisitor<C>

Type Parameters:
C - type of the contextual value
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MessageVisitor<C>
Callback invoked when traversal enters a proto message. The returned value becomes the contextual value in scope for that message and everything within it, and is restored to the enclosing value once traversal leaves the message. The message is provided as a builder and may be inspected or mutated.
  • Method Summary

    Modifier and Type
    Method
    Description
    onEnter(C current, com.google.protobuf.MessageOrBuilder message)
    Handles a message being entered and returns the contextual value for it and its contents.
  • Method Details

    • onEnter

      C onEnter(C current, com.google.protobuf.MessageOrBuilder message)
      Handles a message being entered and returns the contextual value for it and its contents.
      Parameters:
      current - the contextual value in scope from the enclosing message
      message - the message being entered
      Returns:
      the contextual value to use for this message and its contents