@Test public void regular() { ArrayList<Import> imports = new ArrayList<>(); imports.add(new Import("org.test.Hello")); imports.add(new Import("org.test.Hello2")); imports.add(new Import("org.test.Hello3")); assertEquals("org.test.Hello", new ImportsToFQCN(imports).resolveFQCN("Hello")); }
public String resolveFQCN(final String shortName) { for (Import item : imports) { if (item.getType().endsWith(shortName)) { return item.getType(); } } return shortName; }
ImportsToFQCN { public String resolveFQCN(final String shortName) { for (Import item : imports) { if (item.getType().endsWith(shortName)) { return item.getType(); } } return shortName; } }
ImportsToFQCN { public String resolveFQCN(final String shortName) { for (Import item : imports) { if (item.getType().endsWith(shortName)) { return item.getType(); } } return shortName; } ImportsToFQCN(final List<Import> imports); }
ImportsToFQCN { public String resolveFQCN(final String shortName) { for (Import item : imports) { if (item.getType().endsWith(shortName)) { return item.getType(); } } return shortName; } ImportsToFQCN(final List<Import> imports); String resolveFQCN(final String shortName); }
ImportsToFQCN { public String resolveFQCN(final String shortName) { for (Import item : imports) { if (item.getType().endsWith(shortName)) { return item.getType(); } } return shortName; } ImportsToFQCN(final List<Import> imports); String resolveFQCN(final String shortName);  }