@Test public void testResolve() { ClassAliasResolver<IDummyAliasTest> resolver = new ClassAliasResolver<>(IDummyAliasTest.class); Assert.assertEquals(resolver.resolve("abc"), DummyAliasTest.class.getName()); Assert.assertEquals(resolver.resolve("abcd"), "abcd"); }
public String resolve(final String possibleAlias) { if (this.aliasToClassCache.containsKey(possibleAlias.toUpperCase())) { return this.aliasToClassCache.get(possibleAlias.toUpperCase()).getName(); } return possibleAlias; }
ClassAliasResolver { public String resolve(final String possibleAlias) { if (this.aliasToClassCache.containsKey(possibleAlias.toUpperCase())) { return this.aliasToClassCache.get(possibleAlias.toUpperCase()).getName(); } return possibleAlias; } }
ClassAliasResolver { public String resolve(final String possibleAlias) { if (this.aliasToClassCache.containsKey(possibleAlias.toUpperCase())) { return this.aliasToClassCache.get(possibleAlias.toUpperCase()).getName(); } return possibleAlias; } ClassAliasResolver(Class<T> subTypeOf); }
ClassAliasResolver { public String resolve(final String possibleAlias) { if (this.aliasToClassCache.containsKey(possibleAlias.toUpperCase())) { return this.aliasToClassCache.get(possibleAlias.toUpperCase()).getName(); } return possibleAlias; } ClassAliasResolver(Class<T> subTypeOf); String resolve(final String possibleAlias); Class<? extends T> resolveClass(final String aliasOrClassName); Map<String, Class<? extends T>> getAliasMap(); List<Alias> getAliasObjects(); }
ClassAliasResolver { public String resolve(final String possibleAlias) { if (this.aliasToClassCache.containsKey(possibleAlias.toUpperCase())) { return this.aliasToClassCache.get(possibleAlias.toUpperCase()).getName(); } return possibleAlias; } ClassAliasResolver(Class<T> subTypeOf); String resolve(final String possibleAlias); Class<? extends T> resolveClass(final String aliasOrClassName); Map<String, Class<? extends T>> getAliasMap(); List<Alias> getAliasObjects();  }