Class CodeSnippetJavaDocNotes

java.lang.Object
net.jrodolfo.java_evolution.java18.CodeSnippetJavaDocNotes

public class CodeSnippetJavaDocNotes extends Object
Explains JavaDoc code snippets introduced in Java 18.

Before Java 18, JavaDoc examples often used plain <pre> blocks. Those examples were readable, but the documentation tool treated them mostly as formatted text. Java 18 added the @snippet tag so documentation can include code examples in a more structured way.

This matters in a learning project because code examples in documentation should be easy to format consistently and easy to scan in the generated JavaDoc site.

  • Constructor Details

    • CodeSnippetJavaDocNotes

      public CodeSnippetJavaDocNotes()
  • Method Details

    • tagName

      public String tagName()
      Names the JavaDoc tag.
      Returns:
      the tag name
    • inlineSnippetExample

      public String inlineSnippetExample()
      Shows a small inline snippet.
      Returns:
      snippet text that can appear in JavaDoc
    • purpose

      public String purpose()
      Explains why snippets matter.
      Returns:
      a short explanation