ToJavaCode updated to work with new integer-based interface