code: public static OperationBuilder wrap(final Operation operation)
     {
        if (operation == null)
           return create();
        if (operation instanceof OperationBuilder)
           return (OperationBuilder) operation;
  
        return new DefaultOperationBuilderInternal(operation) {
           @Override
           public void perform(Rewrite event, EvaluationContext context)
           {
              operation.perform(event, context);
           }
        };
     }
docs: Wrap a given {@link Operation} as a new {@link DefaultOperationBuilder} that performs the action of the original
  {@link Operation} when {@link #perform(Rewrite, EvaluationContext)} is invoked.