public final class GitURI extends Object
Constructor and Description |
---|
GitURI(String uriString)
Constructor creating an instance of a Git URI.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getHost()
Returns the URI's host.
|
String |
getPass()
Returns the password part of the URI's credentials part.
|
String |
getPath()
Returns the path on the host to the resource denoted by the URI.
|
int |
getPort()
Returns the port number specified by the URI.
|
String |
getScheme()
Returns the URI's scheme as a string.
|
String |
getUser()
Returns the username part of the URI's credentials part.
|
int |
hashCode() |
boolean |
isRemote()
Returns
true if this URI references a repository on another system. |
GitURI |
setHost(String host)
Creates a new instance with the given new host name.
|
GitURI |
setPass(String password)
Creates a new instance with the given new password.
|
GitURI |
setPath(String path)
Constructs a new instance with the given path.
|
GitURI |
setPort(int port)
Constructs a new instance with the given port number.
|
GitURI |
setScheme(String scheme)
Constructs a new instance with the given user name.
|
GitURI |
setUser(String user)
Constructs a new instance with the given user name.
|
String |
toPrivateString()
Returns string representation that contains also username and password as plaintext.
|
String |
toString()
Returns string representation if the URI without the credentials part
|
public GitURI(String uriString) throws URISyntaxException
uriString
- string representation of a Git URI.URISyntaxException
- if the given string has unsupported formatpublic String toPrivateString()
public GitURI setUser(String user)
user
- user namepublic GitURI setScheme(String scheme)
scheme
- new schemepublic GitURI setPort(int port)
port
- port numberpublic GitURI setPath(String path)
path
- path to a resourcepublic GitURI setPass(String password)
password
- new passwordpublic GitURI setHost(String host)
host
- new host namepublic boolean isRemote()
true
if this URI references a repository on another system.public String getUser()
public String getScheme()
public int getPort()
public String getPath()
public String getPass()
public String getHost()
public String toString()