public final class SCMName extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
fromUrl(String url,
List<String> ignoredPrefixes)
Makes best effort to guess a "sensible" display name from the hostname in the URL.
|
static String |
fromUrl(String url,
String... ignoredPrefixes)
Makes best effort to guess a "sensible" display name from the hostname in the URL.
|
@CheckForNull public static String fromUrl(@NonNull String url, @CheckForNull String... ignoredPrefixes)
SCMName.fromUrl("https://github.example.com", "github.") should return "example".url - the URL.ignoredPrefixes - the prefixes that should be ignored.null@CheckForNull public static String fromUrl(@NonNull String url, @CheckForNull List<String> ignoredPrefixes)
SCMName.fromUrl("https://github.example.com", Arrays.asList("github.")) should return
"example".url - the URL.ignoredPrefixes - the prefixes that should be ignored.nullCopyright © 2016–2019. All rights reserved.