Interface ExpressionEditor.NewExprReplacer

  • Enclosing class:
    ExpressionEditor
    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 static interface ExpressionEditor.NewExprReplacer
    Functional interface for new expression replacement.
    • Method Detail

      • replace

        Expression replace​(EditorContext ctx,
                           NewExpr newExpr)
        Builds the expression that takes the allocation's place.
        Parameters:
        ctx - the surrounding edit context
        newExpr - the matched new expression
        Returns:
        the replacement expression, or null to leave the allocation alone