java/translator: Class reference support for ldc

Signed-off-by: Pekka Enberg <penberg@iki.fi>