public abstract class RepositorySpec extends java.lang.Object implements PrettyPrintable
| Modifier | Constructor and Description |
|---|---|
protected |
RepositorySpec(java.lang.String pName,
java.lang.String pUrl)
Create a new
RepositorySpec. |
| Modifier and Type | Method and Description |
|---|---|
CredentialsSpec |
getCredentials()
Get the credentials to use when accessing the repository.
|
java.lang.String |
getName()
Get the repository's name.
|
java.lang.String |
getUrl()
Get the repository's url.
|
static void |
prettyPrintRepositories(GradlePrettyPrinter pPrinter,
java.util.Collection<? extends RepositorySpec> pRepositories)
Pretty print a collection of repository specifications on Gradle repository closure format.
|
protected void |
printClosureBody(GradlePrettyPrinter pPrinter)
Print the body of a closure containing the values of this repository specification.
|
void |
setCredentials(java.lang.String pUserName,
java.lang.String pPassword)
Set the credentials to use when accessing the repository.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprettyPrint, quoteprotected RepositorySpec(java.lang.String pName,
java.lang.String pUrl)
RepositorySpec.pName - The repository's name.pUrl - The repository's url.java.lang.NullPointerException - if pName is null.public java.lang.String getName()
public java.lang.String getUrl()
public CredentialsSpec getCredentials()
public void setCredentials(java.lang.String pUserName,
java.lang.String pPassword)
pUserName - The user name. Pass null to clear the credentials.pPassword - The password.public static void prettyPrintRepositories(GradlePrettyPrinter pPrinter, java.util.Collection<? extends RepositorySpec> pRepositories)
pPrinter - The printer to print with.pRepositories - The repositories to print.java.lang.NullPointerException - if any of the parameters is null.protected void printClosureBody(GradlePrettyPrinter pPrinter)
pPrinter - The printer to print with.java.lang.NullPointerException - if pPrinter is null.