CustomResource is what's called an "overlay" resource. It has a shape that's not expressible in the Pulumi schema and so can't be code generated for each language, instead it has to be manually written.
We're trying to get rid of overlay resources, and I'd guess the plan for this was to replace CustomResource with a proper resource so it then works for all languages rather than writing another overlay for Java. Appears that hasn't been done yet.