/** * Checks for a hidden implementation, first finding the class by name. * * @param className name of a class * @param fieldName name of a field (different from constructor) * @return this Builder for method chaining * @see java.lang.Class#forName(String) * @see java.lang.Class#getField(String) */ public Builder hiddenImpl(String className, String fieldName) { // don't do any work if an implementation has been found if (field != null) { return this; } try { Class<?> targetClass = Class.forName(className, true, loader); hiddenImpl(targetClass, fieldName); } catch (ClassNotFoundException e) { // not the right implementation candidates.add(className + "." + fieldName); } return this; }