-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a URLHelper factory API to ParsingUtils (#1421)
* Add a URLHelper factory API to ParsingUtils -- this is a replacement for the previous implementation which used reflection to accomplish the same thing. This is necessary because the reflection code no longer worked under Java 11 * Remove old reflection-based method `registerHelperClass` and public static variable `urlHelperClass` * This is a breaking change, users of the old api (registerHelperClass) will have to update to use the new factory API (setURLHelperFactory).
- Loading branch information
1 parent
4d73aff
commit c33b695
Showing
6 changed files
with
66 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package htsjdk.tribble.util; | ||
|
||
import java.net.URL; | ||
|
||
/** | ||
* A factory for creating {@link URLHelper} instances. The factory contains a single function | ||
* @see #getHelper(URL) which should return a <code>URLHelper</code> instance for the given URL. | ||
*/ | ||
public interface URLHelperFactory { | ||
|
||
/** | ||
* @param url | ||
* @return a {@link URLHelper} object for the given URL | ||
*/ | ||
URLHelper getHelper(URL url); | ||
|
||
} |