Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOXIA-709] Cleanup overloaded Doxia 1.0 methods #182

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 16 additions & 139 deletions doxia-core/src/main/java/org/apache/maven/doxia/index/IndexingSink.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Stack;
import java.util.concurrent.atomic.AtomicInteger;

import org.apache.maven.doxia.sink.SinkEventAttributes;
import org.apache.maven.doxia.sink.impl.SinkAdapter;
import org.apache.maven.doxia.util.DoxiaUtils;

Expand Down Expand Up @@ -101,160 +102,36 @@ public String getTitle() {
// Sink Overrides
// ----------------------------------------------------------------------

/**
* {@inheritDoc}
*/
public void title() {
@Override
public void title(SinkEventAttributes attributes) {
this.type = TITLE;
}

/**
* {@inheritDoc}
*/
public void section1() {
@Override
public void section(int level, SinkEventAttributes attributes) {
pushNewEntry();
}

/**
* {@inheritDoc}
*/
public void sectionTitle1() {
this.type = TYPE_SECTION_1;
}

/**
* {@inheritDoc}
*/
public void title_() {
this.type = 0;
}

/**
* <p>sectionTitle1_.</p>
*/
public void sectionTitle1_() {
this.type = 0;
}

/**
* {@inheritDoc}
*/
public void section1_() {
@Override
public void section_(int level) {
pop();
}

/**
* {@inheritDoc}
*/
public void section2() {
pushNewEntry();
}

/**
* {@inheritDoc}
*/
public void sectionTitle2() {
this.type = TYPE_SECTION_2;
@Override
public void sectionTitle(int level, SinkEventAttributes attributes) {
this.type = level;
}

/**
* <p>sectionTitle2_.</p>
*/
public void sectionTitle2_() {
@Override
public void sectionTitle_(int level) {
this.type = 0;
}

/**
* {@inheritDoc}
*/
public void section2_() {
pop();
}

/**
* {@inheritDoc}
*/
public void section3() {
pushNewEntry();
}

/**
* {@inheritDoc}
*/
public void sectionTitle3() {
this.type = TYPE_SECTION_3;
}

/**
* <p>sectionTitle3_.</p>
*/
public void sectionTitle3_() {
this.type = 0;
}

/**
* {@inheritDoc}
*/
public void section3_() {
pop();
}

/**
* {@inheritDoc}
*/
public void section4() {
pushNewEntry();
}

/**
* {@inheritDoc}
*/
public void sectionTitle4() {
this.type = TYPE_SECTION_4;
}

/**
* <p>sectionTitle4_.</p>
*/
public void sectionTitle4_() {
this.type = 0;
}

/**
* {@inheritDoc}
*/
public void section4_() {
pop();
}

/**
* {@inheritDoc}
*/
public void section5() {
pushNewEntry();
}

/**
* {@inheritDoc}
*/
public void sectionTitle5() {
this.type = TYPE_SECTION_5;
}

/**
* <p>sectionTitle5_.</p>
*/
public void sectionTitle5_() {
@Override
public void title_() {
this.type = 0;
}

/**
* {@inheritDoc}
*/
public void section5_() {
pop();
}

// public void definedTerm()
// {
// type = TYPE_DEFINED_TERM;
Expand All @@ -270,8 +147,8 @@ public void section5_() {
// type = TYPE_TABLE;
// }

/** {@inheritDoc} */
public void text(String text) {
@Override
public void text(String text, SinkEventAttributes attributes) {
switch (this.type) {
case TITLE:
this.title = text;
Expand Down
Loading