Interface StatementHandler

  • 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 StatementHandler
    Base interface for handling statements during AST editing.
    • Method Detail

      • handle

        Replacement handle​(EditorContext ctx,
                           Statement stmt)
        Handle a statement during AST traversal.
        Parameters:
        ctx - the editing context with utilities and method info
        stmt - the statement being visited
        Returns:
        the replacement action (keep, replace, remove, etc.)