@Test public void testFindProtocolWithProviderInIdentifier() { final TestProtocol dav = new TestProtocol(Scheme.dav) { @Override public String getIdentifier() { return "dav"; } @Override public String getProvider() { return "provider"; } }; final ProtocolFactory f = new ProtocolFactory(new LinkedHashSet<>(Collections.singletonList(dav))); assertEquals(dav, f.forName("dav")); assertEquals(dav, f.forName("dav-provider")); }
public Protocol forName(final String identifier) { return this.forName(identifier, null); }
ProtocolFactory { public Protocol forName(final String identifier) { return this.forName(identifier, null); } }
ProtocolFactory { public Protocol forName(final String identifier) { return this.forName(identifier, null); } ProtocolFactory();  ProtocolFactory(final Set<Protocol> protocols);  ProtocolFactory(final Local bundle, final Set<Protocol> protocols); }
ProtocolFactory { public Protocol forName(final String identifier) { return this.forName(identifier, null); } ProtocolFactory();  ProtocolFactory(final Set<Protocol> protocols);  ProtocolFactory(final Local bundle, final Set<Protocol> protocols); static ProtocolFactory get(); void register(Protocol... protocols); void loadDefaultProfiles(); void register(final Protocol protocol); List<Protocol> find(); List<Protocol> find(final Predicate<Protocol> search); Protocol forName(final String identifier); Protocol forName(final String identifier, final String provider); Protocol forName(final List<Protocol> enabled, final String identifier, final String provider); Protocol forType(final Protocol.Type type); Protocol forScheme(final Scheme scheme); Protocol forScheme(final String scheme, final Protocol fallback); @Override String toString(); }
ProtocolFactory { public Protocol forName(final String identifier) { return this.forName(identifier, null); } ProtocolFactory();  ProtocolFactory(final Set<Protocol> protocols);  ProtocolFactory(final Local bundle, final Set<Protocol> protocols); static ProtocolFactory get(); void register(Protocol... protocols); void loadDefaultProfiles(); void register(final Protocol protocol); List<Protocol> find(); List<Protocol> find(final Predicate<Protocol> search); Protocol forName(final String identifier); Protocol forName(final String identifier, final String provider); Protocol forName(final List<Protocol> enabled, final String identifier, final String provider); Protocol forType(final Protocol.Type type); Protocol forScheme(final Scheme scheme); Protocol forScheme(final String scheme, final Protocol fallback); @Override String toString();  }