DiscoverySelector (String line) { int nestedClassIdx = line.lastIndexOf("$"); if (nestedClassIdx > 0) { AtomicReference<DiscoverySelector> nestedClassSelector = new AtomicReference<>(); ReflectionSupport.tryToLoadClass(line).ifFailure(__ -> { nestedClassSelector.set(getNestedSelector(line, nestedClassIdx)); }); if (nestedClassSelector.get() != null) return nestedClassSelector.get(); } return DiscoverySelectors.selectClass(line); }