Package org.eclipse.aether.repository
Class LocalRepository
- java.lang.Object
-
- org.eclipse.aether.repository.LocalRepository
-
- All Implemented Interfaces:
ArtifactRepository
public final class LocalRepository extends java.lang.Object implements ArtifactRepository
A repository on the local file system used to cache contents of remote repositories and to store locally installed artifacts. Note that this class merely describes such a repository, actual access to the contained artifacts is handled by aLocalRepositoryManagerwhich is usually determined from thetypeof the repository.
-
-
Constructor Summary
Constructors Constructor Description LocalRepository(java.io.File basedir)Creates a new local repository with the specified base directory and unknown type.LocalRepository(java.io.File basedir, java.lang.String type)Creates a new local repository with the specified properties.LocalRepository(java.lang.String basedir)Creates a new local repository with the specified base directory and unknown type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.io.FilegetBasedir()Gets the base directory of the repository.java.lang.StringgetContentType()Gets the type of the repository, for example "default".java.lang.StringgetId()Gets the identifier of this repository.private static inthash(java.lang.Object obj)inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
LocalRepository
public LocalRepository(java.lang.String basedir)
Creates a new local repository with the specified base directory and unknown type.- Parameters:
basedir- The base directory of the repository, may benull.
-
LocalRepository
public LocalRepository(java.io.File basedir)
Creates a new local repository with the specified base directory and unknown type.- Parameters:
basedir- The base directory of the repository, may benull.
-
LocalRepository
public LocalRepository(java.io.File basedir, java.lang.String type)Creates a new local repository with the specified properties.- Parameters:
basedir- The base directory of the repository, may benull.type- The type of the repository, may benull.
-
-
Method Detail
-
getContentType
public java.lang.String getContentType()
Description copied from interface:ArtifactRepositoryGets the type of the repository, for example "default".- Specified by:
getContentTypein interfaceArtifactRepository- Returns:
- The (case-sensitive) type of the repository, never
null.
-
getId
public java.lang.String getId()
Description copied from interface:ArtifactRepositoryGets the identifier of this repository.- Specified by:
getIdin interfaceArtifactRepository- Returns:
- The (case-sensitive) identifier, never
null.
-
getBasedir
public java.io.File getBasedir()
Gets the base directory of the repository.- Returns:
- The base directory or
nullif none.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
hash
private static int hash(java.lang.Object obj)
-
-