private Interface resolveInterface(String name, LocationContext location) { Interface iface = getModel().getSymbolTable().resolveInterface("", name); if (iface == null) { error(location, "The API '%s' cannot be resolved.", name); } return iface; } }
private Interface resolveInterface(String name, LocationContext location) { Interface iface = getModel().getSymbolTable().resolveInterface("", name); if (iface == null) { error(location, "The API '%s' cannot be resolved.", name); } return iface; } }
@Test public void testResolveInterface() { Assert.assertSame(s1, table.resolveInterface("a.b", "s1")); Assert.assertSame(s1, table.resolveInterface("a.b", "b.s1")); Assert.assertSame(s1, table.resolveInterface("a.b", "a.b.s1")); Assert.assertSame(s1, table.resolveInterface("a.b", ".a.b.s1")); }