boolean (final @Nullable RegExpNamedGroupRef ref) { final RegExpLanguageHost host = findRegExpHost(ref); try { return host == null || host.supportsNamedGroupRefSyntax(ref); } catch (AbstractMethodError e) { // supportsNamedGroupRefSyntax() not present return false; } }