Skip to content

Commit

Permalink
Rename method to toggle anchor generation
Browse files Browse the repository at this point in the history
Clarify exception message in IndexingSink.getRootEntry()
  • Loading branch information
kwin committed Dec 16, 2023
1 parent ce58dfd commit 88714da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private IndexingSink(IndexEntry rootEntry, Sink delegate) {
public IndexEntry getRootEntry() {
if (!isComplete) {
throw new IllegalStateException(
"The sink has not been closed yet, i.e. the index tree is not complete yet");
"This sink has not been closed yet, i.e. the index tree is not complete yet");
}
return rootEntry;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ public boolean isEmitComments() {
}

@Override
public boolean isEmitAnchors() {
public boolean isEmitAnchorsForIndexableEntries() {
return emitAnchors;
}

@Override
public void setEmitAnchors(boolean emitAnchors) {
public void setEmitAnchorsForIndexableEntries(boolean emitAnchors) {
this.emitAnchors = emitAnchors;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ public interface Parser {
* @param emitAnchors {@code true} to emit anchors otherwise {@code false} (the default)
* @since 2.0.0
*/
void setEmitAnchors(boolean emitAnchors);
void setEmitAnchorsForIndexableEntries(boolean emitAnchors);

/**
* Returns whether anchors are automatically generated for each index entry found by {@link IndexingSink} or not.
* @return {@code true} if anchors are emitted otherwise {@code false}
* @since 2.0.0
*/
boolean isEmitAnchors();
boolean isEmitAnchorsForIndexableEntries();
}

0 comments on commit 88714da

Please sign in to comment.