Query.getReturnAliases() best alternative

Hello,

any suggestion? Thank you in advance!