java: use Guava Optional
compiler: java: delegate equals method to type