How to fetch the Branch object, given its ID (Bitbucket data center Java API)?

Hello!
This question is regarding the availability of a specific method in Bitbucket Java API (v8.19), needed for one of the plugins that I’m developing. I’m trying to get the Branch object, given its branch ID (in String format). As of now I’m able to only get the object by scanning and filtering through all the branches of the repository (using refService.getBranches() method).

But this method seems to be using unnecessary compute resources in case of large repositories. I could not find an alternative class/ method that could achieve this from the Java API docs.

I want your assistance in finding out the class and method that enables getting the branch object, provided its ID in string to achieve the same thing with lesser complexity, if it exists.

Warm regards
Ajaykumar Muthukumar