diff --git a/asciidoctorj-api/src/main/java/org/asciidoctor/ast/Document.java b/asciidoctorj-api/src/main/java/org/asciidoctor/ast/Document.java index 86cbbff9..faab0889 100644 --- a/asciidoctorj-api/src/main/java/org/asciidoctor/ast/Document.java +++ b/asciidoctorj-api/src/main/java/org/asciidoctor/ast/Document.java @@ -17,19 +17,12 @@ public interface Document extends StructuralNode { */ String getDoctitle(); - /** - * @deprecated Please use {@link #getDoctitle()} - * @return The title as a String. - * @see Title - */ - @Deprecated - String doctitle(); - /** * Gets the author(s) information as defined in the author line * in the document header, or in author & email attributes. * - * @return authors information + * @return The authors information + * @see Author */ List getAuthors(); @@ -37,32 +30,24 @@ public interface Document extends StructuralNode { * Make the raw source for the Document available. * Trailing white characters (spaces, line breaks, etc.) are removed. * - * @return raw content as String + * @return Raw content as String */ String getSource(); /** * Make the raw source lines for the Document available. * - * @return raw content as List + * @return Raw content as List */ List getSourceLines(); /** - * @return basebackend attribute value + * @return 'basebackend' attribute value */ boolean isBasebackend(String backend); /** - * @deprecated Please use {@link #isBasebackend(String)} - * @return basebackend attribute value - */ - @Deprecated - boolean basebackend(String backend); - - /** - * - * @return options defined in document. + * @return Options defined in the document */ Map getOptions(); @@ -70,8 +55,9 @@ public interface Document extends StructuralNode { * Gets the current counter with the given name and increases its value. * At the first invocation the counter will return 1. * After the call the value of the counter is set to the returned value plus 1. - * @param name - * @return + * + * @param name name of the counter + * @return Value before increment plus 1 */ int getAndIncrementCounter(String name); @@ -79,24 +65,25 @@ public interface Document extends StructuralNode { * Gets the current counter with the given name and increases its value. * At the first invocation the counter will return the given initial value. * After the call the value of the counter is set to the returned value plus 1. - * @param name - * @param initialValue - * @return + * + * @param name name of the counter + * @param initialValue value to start counter from + * @return Value before increment plus 1 */ int getAndIncrementCounter(String name, int initialValue); /** - * @return Whether the sourcemap is enabled. + * @return Whether the sourcemap is enabled */ boolean isSourcemap(); /** * Toggles the sourcemap option. - * + *

* This method must be called before the document is parsed, such as * from a Preprocessor extension. Otherwise, it has no effect. * - * @param state The state in which to put the sourcemap (true = on, false = off). + * @param state State in which to put the sourcemap (true = on, false = off) */ void setSourcemap(boolean state); @@ -104,9 +91,8 @@ public interface Document extends StructuralNode { /** * The catalog contains data collected by asciidoctor that is useful to a converter. * - * Note that the catalog is not part of the asciidoctor public API and is subject to change. - * - * @return catalog + * @return Catalog assets + * @see Catalog */ Catalog getCatalog(); @@ -115,6 +101,7 @@ public interface Document extends StructuralNode { * The revision information with: date, number and remark. * * @return revisionInfo + * @see RevisionInfo */ RevisionInfo getRevisionInfo(); } diff --git a/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/ast/impl/DocumentImpl.java b/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/ast/impl/DocumentImpl.java index d4f7497c..bad3b2f5 100644 --- a/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/ast/impl/DocumentImpl.java +++ b/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/ast/impl/DocumentImpl.java @@ -31,12 +31,6 @@ public boolean isBasebackend(String backend) { return getBoolean("basebackend?", backend); } - @Override - @Deprecated - public boolean basebackend(String backend) { - return isBasebackend(backend); - } - @Override public Map getOptions() { return RubyHashUtil.convertRubyHashMapToMap((RubyHash) getRubyProperty("options")); @@ -52,7 +46,6 @@ public Title getStructuredDoctitle() { Object doctitle = getRubyProperty("doctitle", options); return toJava((IRubyObject) doctitle, Title.class); - } @Override @@ -60,12 +53,6 @@ public String getDoctitle() { return getString("doctitle"); } - @Override - @Deprecated - public String doctitle() { - return getDoctitle(); - } - @Override public List getAuthors() { return getList("authors", RubyStruct.class)