RefDatabase: fix javadoc formatting

Change-Id: I547819ac380a0e6a88d05206ff171b69f46a8549
This commit is contained in:
Matthias Sohn 2022-12-30 10:25:01 +01:00
parent ddf1c1ed3c
commit 8ef58089a8
1 changed files with 35 additions and 29 deletions

View File

@ -40,10 +40,10 @@ public abstract class RefDatabase {
/** /**
* Order of prefixes to search when using non-absolute references. * Order of prefixes to search when using non-absolute references.
* <p> * <p>
* {@link #findRef(String)} takes this search space into consideration * {@link #findRef(String)} takes this search space into consideration when
* when locating a reference by name. The first entry in the path is * locating a reference by name. The first entry in the path is always
* always {@code ""}, ensuring that absolute references are resolved * {@code ""}, ensuring that absolute references are resolved without
* without further mangling. * further mangling.
*/ */
protected static final String[] SEARCH_PATH = { "", //$NON-NLS-1$ protected static final String[] SEARCH_PATH = { "", //$NON-NLS-1$
Constants.R_REFS, // Constants.R_REFS, //
@ -350,12 +350,12 @@ public Ref firstExactRef(String... refs) throws IOException {
/** /**
* Returns all refs. * Returns all refs.
* <p> * <p>
* This includes {@code HEAD}, branches under {@code ref/heads/}, tags * This includes {@code HEAD}, branches under {@code ref/heads/}, tags under
* under {@code refs/tags/}, etc. It does not include pseudo-refs like * {@code refs/tags/}, etc. It does not include pseudo-refs like
* {@code FETCH_HEAD}; for those, see {@link #getAdditionalRefs}. * {@code FETCH_HEAD}; for those, see {@link #getAdditionalRefs}.
* <p> * <p>
* Symbolic references to a non-existent ref (for example, * Symbolic references to a non-existent ref (for example, {@code HEAD}
* {@code HEAD} pointing to a branch yet to be born) are not included. * pointing to a branch yet to be born) are not included.
* <p> * <p>
* Callers interested in only a portion of the ref hierarchy can call * Callers interested in only a portion of the ref hierarchy can call
* {@link #getRefsByPrefix} instead. * {@link #getRefsByPrefix} instead.
@ -395,8 +395,9 @@ public List<Ref> getRefs() throws IOException {
* {@link RefDatabase} should override this method directly if a better * {@link RefDatabase} should override this method directly if a better
* implementation is possible. * implementation is possible.
* *
* @param prefix string that names of refs should start with; may be * @param prefix
* empty (to return all refs). * string that names of refs should start with; may be empty (to
* return all refs).
* @return immutable list of refs whose names start with {@code prefix}. * @return immutable list of refs whose names start with {@code prefix}.
* @throws java.io.IOException * @throws java.io.IOException
* the reference space cannot be accessed. * the reference space cannot be accessed.
@ -426,18 +427,22 @@ public List<Ref> getRefsByPrefix(String prefix) throws IOException {
} }
/** /**
* Returns refs whose names start with a given prefix excluding all refs that * Returns refs whose names start with a given prefix excluding all refs
* start with one of the given prefixes. * that start with one of the given prefixes.
* *
* <p> * <p>
* The default implementation is not efficient. Implementors of {@link RefDatabase} * The default implementation is not efficient. Implementors of
* should override this method directly if a better implementation is possible. * {@link RefDatabase} should override this method directly if a better
* * implementation is possible.
* @param include string that names of refs should start with; may be empty. *
* @param excludes strings that names of refs can't start with; may be empty. * @param include
* @return immutable list of refs whose names start with {@code prefix} and none * string that names of refs should start with; may be empty.
* of the strings in {@code exclude}. * @param excludes
* @throws java.io.IOException the reference space cannot be accessed. * strings that names of refs can't start with; may be empty.
* @return immutable list of refs whose names start with {@code prefix} and
* none of the strings in {@code exclude}.
* @throws java.io.IOException
* the reference space cannot be accessed.
* @since 5.11 * @since 5.11
*/ */
@NonNull @NonNull
@ -501,13 +506,14 @@ public Set<Ref> getTipsWithSha1(ObjectId id) throws IOException {
} }
/** /**
* If the ref database does not support fast inverse queries, it may * If the ref database does not support fast inverse queries, it may be
* be advantageous to build a complete SHA1 to ref map in advance for * advantageous to build a complete SHA1 to ref map in advance for multiple
* multiple uses. To let applications decide on this decision, * uses. To let applications decide on this decision, this function
* this function indicates whether the inverse map is available. * indicates whether the inverse map is available.
* *
* @return whether this RefDatabase supports fast inverse ref queries. * @return whether this RefDatabase supports fast inverse ref queries.
* @throws IOException on I/O problems. * @throws IOException
* on I/O problems.
* @since 5.6 * @since 5.6
*/ */
public boolean hasFastTipsWithSha1() throws IOException { public boolean hasFastTipsWithSha1() throws IOException {
@ -518,10 +524,10 @@ public boolean hasFastTipsWithSha1() throws IOException {
* Check if any refs exist in the ref database. * Check if any refs exist in the ref database.
* <p> * <p>
* This uses the same definition of refs as {@link #getRefs()}. In * This uses the same definition of refs as {@link #getRefs()}. In
* particular, returns {@code false} in a new repository with no refs * particular, returns {@code false} in a new repository with no refs under
* under {@code refs/} and {@code HEAD} pointing to a branch yet to be * {@code refs/} and {@code HEAD} pointing to a branch yet to be born, and
* born, and returns {@code true} in a repository with no refs under * returns {@code true} in a repository with no refs under {@code refs/} and
* {@code refs/} and a detached {@code HEAD} pointing to history. * a detached {@code HEAD} pointing to history.
* *
* @return true if the database has refs. * @return true if the database has refs.
* @throws java.io.IOException * @throws java.io.IOException