Added caching capabilities to genericJavaOverload