@Test public void toInterfaceLinkLocation() { InterfaceLocation ifaceLocation = new InterfaceLocation("foo", "bar"); InterfaceLinkLocation ifaceLinkLocation = new InterfaceLinkLocation("foo", "bar"); assertThat( ToInterfaceLinkLocationSpecifier.toInterfaceLinkLocation(ifaceLocation), equalTo(ifaceLinkLocation)); assertThat( ToInterfaceLinkLocationSpecifier.toInterfaceLinkLocation(ifaceLinkLocation), equalTo(ifaceLinkLocation)); }
static Location toInterfaceLinkLocation(Location loc) { return loc.accept( new LocationVisitor<Location>() { @Override public Location visitInterfaceLinkLocation(InterfaceLinkLocation interfaceLinkLocation) { return interfaceLinkLocation; } @Override public Location visitInterfaceLocation(InterfaceLocation interfaceLocation) { return new InterfaceLinkLocation( interfaceLocation.getNodeName(), interfaceLocation.getInterfaceName()); } }); }
ToInterfaceLinkLocationSpecifier implements LocationSpecifier { static Location toInterfaceLinkLocation(Location loc) { return loc.accept( new LocationVisitor<Location>() { @Override public Location visitInterfaceLinkLocation(InterfaceLinkLocation interfaceLinkLocation) { return interfaceLinkLocation; } @Override public Location visitInterfaceLocation(InterfaceLocation interfaceLocation) { return new InterfaceLinkLocation( interfaceLocation.getNodeName(), interfaceLocation.getInterfaceName()); } }); } }
ToInterfaceLinkLocationSpecifier implements LocationSpecifier { static Location toInterfaceLinkLocation(Location loc) { return loc.accept( new LocationVisitor<Location>() { @Override public Location visitInterfaceLinkLocation(InterfaceLinkLocation interfaceLinkLocation) { return interfaceLinkLocation; } @Override public Location visitInterfaceLocation(InterfaceLocation interfaceLocation) { return new InterfaceLinkLocation( interfaceLocation.getNodeName(), interfaceLocation.getInterfaceName()); } }); } ToInterfaceLinkLocationSpecifier(LocationSpecifier inner); }
ToInterfaceLinkLocationSpecifier implements LocationSpecifier { static Location toInterfaceLinkLocation(Location loc) { return loc.accept( new LocationVisitor<Location>() { @Override public Location visitInterfaceLinkLocation(InterfaceLinkLocation interfaceLinkLocation) { return interfaceLinkLocation; } @Override public Location visitInterfaceLocation(InterfaceLocation interfaceLocation) { return new InterfaceLinkLocation( interfaceLocation.getNodeName(), interfaceLocation.getInterfaceName()); } }); } ToInterfaceLinkLocationSpecifier(LocationSpecifier inner); @Override boolean equals(Object o); @Override int hashCode(); @Override Set<Location> resolve(SpecifierContext ctxt); }
ToInterfaceLinkLocationSpecifier implements LocationSpecifier { static Location toInterfaceLinkLocation(Location loc) { return loc.accept( new LocationVisitor<Location>() { @Override public Location visitInterfaceLinkLocation(InterfaceLinkLocation interfaceLinkLocation) { return interfaceLinkLocation; } @Override public Location visitInterfaceLocation(InterfaceLocation interfaceLocation) { return new InterfaceLinkLocation( interfaceLocation.getNodeName(), interfaceLocation.getInterfaceName()); } }); } ToInterfaceLinkLocationSpecifier(LocationSpecifier inner); @Override boolean equals(Object o); @Override int hashCode(); @Override Set<Location> resolve(SpecifierContext ctxt);  }