code: public static boolean hasOperationType(Operation operation, Class<? extends Operation> operationType)
      {
          if (operation == null)
              return false;
  
          if (operationType.isAssignableFrom(operation.getClass()))
              return true;
  
          if (operation instanceof CompositeOperation)
          {
              List<Operation> operations = ((CompositeOperation) operation).getOperations();
              for (Operation childOperation : operations)
              {
                  if (hasOperationType(childOperation, operationType))
                      return true;
              }
          }
  
          return false;
      }
docs: Indicates whether or not the provided {@link Operation} is or contains any {@link Operation}s of the specified type. This will recursively
  check all of the suboperations on {@link CompositeOperation}s as well.