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.
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
-
Method Details
-
onEnter
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 messagemessage- the message being entered- Returns:
- the contextual value to use for this message and its contents
-