api/src/main/java/org/ocpsoft/rewrite/config/Operations.java
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);
         }
      };
   }
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);
         }
      };
   }
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.