compiler: java: support validation