Add method to convert RType to Java type