Java hacks for return types