Use scrollIntoView with Xpath

Hi

I always see that i can scroll to an element using:
new UiScrollable(new UiSelector()).scrollIntoView(new UiSelector().text(text));

But what if i need to use this function to scroll to element by its class name selector or Xpath selector
how can i do this?