Class UrlHost

java.lang.Object
io.github.jbastgen.stemma.app.git.UrlHost

public final class UrlHost extends Object
Takes a git remote URL apart: the transport, the host and the user name in it.
  • Method Details

    • parse

      public static Optional<UrlHost.Parts> parse(String url)
      The scheme, user and host of a remote address (HTTPS, ssh:// or scp-like); never a password. Empty when it is no remote address.
    • matches

      public static boolean matches(String pattern, String host)
      Whether pattern (github.com or *.example.org) covers host.