@Test public void testSimpleNameMapping() throws Exception { factory.addClassSimpleNameMapping(MyDriver.class.getSimpleName(), MyCustomDriver.class.getSimpleName()); assertDriverIs(MyCustomDriver.class, sshLocation); }
public DriverInferenceRule addClassSimpleNameMapping(String expectedClassSimpleName, String newClassSimpleName) { DriverInferenceByRenamingClassSimpleName rule = new DriverInferenceByRenamingClassSimpleName(expectedClassSimpleName, newClassSimpleName); return addRule(rule.getIdentifier(), rule); }
ReflectiveEntityDriverFactory { public DriverInferenceRule addClassSimpleNameMapping(String expectedClassSimpleName, String newClassSimpleName) { DriverInferenceByRenamingClassSimpleName rule = new DriverInferenceByRenamingClassSimpleName(expectedClassSimpleName, newClassSimpleName); return addRule(rule.getIdentifier(), rule); } }
ReflectiveEntityDriverFactory { public DriverInferenceRule addClassSimpleNameMapping(String expectedClassSimpleName, String newClassSimpleName) { DriverInferenceByRenamingClassSimpleName rule = new DriverInferenceByRenamingClassSimpleName(expectedClassSimpleName, newClassSimpleName); return addRule(rule.getIdentifier(), rule); } ReflectiveEntityDriverFactory(); }
ReflectiveEntityDriverFactory { public DriverInferenceRule addClassSimpleNameMapping(String expectedClassSimpleName, String newClassSimpleName) { DriverInferenceByRenamingClassSimpleName rule = new DriverInferenceByRenamingClassSimpleName(expectedClassSimpleName, newClassSimpleName); return addRule(rule.getIdentifier(), rule); } ReflectiveEntityDriverFactory(); DriverInferenceRule addRule(String identifier, DriverInferenceRule rule); DriverInferenceRule addClassFullNameMapping(String expectedClassFullName, String newClassFullName); DriverInferenceRule addClassSimpleNameMapping(String expectedClassSimpleName, String newClassSimpleName); D build(DriverDependentEntity<D> entity, Location location); }
ReflectiveEntityDriverFactory { public DriverInferenceRule addClassSimpleNameMapping(String expectedClassSimpleName, String newClassSimpleName) { DriverInferenceByRenamingClassSimpleName rule = new DriverInferenceByRenamingClassSimpleName(expectedClassSimpleName, newClassSimpleName); return addRule(rule.getIdentifier(), rule); } ReflectiveEntityDriverFactory(); DriverInferenceRule addRule(String identifier, DriverInferenceRule rule); DriverInferenceRule addClassFullNameMapping(String expectedClassFullName, String newClassFullName); DriverInferenceRule addClassSimpleNameMapping(String expectedClassSimpleName, String newClassSimpleName); D build(DriverDependentEntity<D> entity, Location location);  }