Package javiergs.tulip
Class URLFactory
java.lang.Object
javiergs.tulip.URLFactory
Parses a GitHub URL and returns a URLObject instance.
It supports:
- https://github.com/{owner}/{repository} - https://github.com/{owner}/{repository}/tree/{revision} - https://github.com/{owner}/{repository}/tree/{revision}/{path...} - https://github.com/{owner}/{repository}/blob/{revision}/{path...}
- Version:
- 3.0
- Author:
- javiergs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic URLObjectparseGitHubUrl(String url) Parses a GitHub URL that explicitly uses /tree/ or /blob/.
-
Constructor Details
-
URLFactory
public URLFactory()
-
-
Method Details
-
parseGitHubUrl
Parses a GitHub URL that explicitly uses /tree/ or /blob/.- Parameters:
url- GitHub URL to parse- Returns:
- URLObject with parsed components
- Throws:
IllegalArgumentException- if the URL is not a valid /tree/ or /blob/ GitHub URL
-