[Java]: Added semanticType support to IR encoding.