The approach NetBeans has used for that historically has been to remove the thing in question, and then use build-time bytecode patching to put it back, so it no longer appears in documentation, but existing code that depends on it will not be broken.
-Tim