Internal utility classes reimplemented for Java 10 and later versions.