Skip to content

Commit e3babc8

Browse files
committed
LocationService: move get*Type methods to iface
1 parent 76e4e1e commit e3babc8

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/main/java/org/scijava/io/location/DefaultLocationService.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
package org.scijava.io.location;
3434

3535
import java.net.URI;
36-
import java.net.URISyntaxException;
3736
import java.util.HashMap;
3837
import java.util.Map;
3938

@@ -54,17 +53,6 @@ public class DefaultLocationService extends
5453

5554
private final Map<String, LocationResolver> resolvers = new HashMap<>();
5655

57-
@Override
58-
public Class<LocationResolver> getPluginType() {
59-
return LocationResolver.class;
60-
}
61-
62-
@Override
63-
public Class<URI> getType() {
64-
return URI.class;
65-
}
66-
67-
6856
@Override
6957
public LocationResolver getResolver(final URI uri) {
7058
return resolvers.computeIfAbsent(uri.getScheme(), u -> getHandler(uri));

src/main/java/org/scijava/io/location/LocationService.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,18 @@ default Location resolve(final URI uri) throws URISyntaxException {
8383
* <code>null</code> if no resolver could be found.
8484
*/
8585
LocationResolver getResolver(URI uri);
86+
87+
// -- PTService methods --
88+
89+
@Override
90+
default Class<LocationResolver> getPluginType() {
91+
return LocationResolver.class;
92+
}
93+
94+
// -- Typed methods --
95+
96+
@Override
97+
default Class<URI> getType() {
98+
return URI.class;
99+
}
86100
}

0 commit comments

Comments
 (0)