Class JavadocMetadataScraper

All Implemented Interfaces:
Configurable, Contextualizable

public class JavadocMetadataScraper extends AbstractJavadocCheck
Class for scraping module metadata from the corresponding class' class-level javadoc.
  • Constructor Details

    • JavadocMetadataScraper

      public JavadocMetadataScraper()
  • Method Details

    • getDefaultJavadocTokens

      public int[] getDefaultJavadocTokens()
      Description copied from class: AbstractJavadocCheck
      Returns the default javadoc token types a check is interested in.
      Specified by:
      getDefaultJavadocTokens in class AbstractJavadocCheck
      Returns:
      the default javadoc token types
      See Also:
    • getRequiredJavadocTokens

      public int[] getRequiredJavadocTokens()
      Description copied from class: AbstractJavadocCheck
      The javadoc tokens that this check must be registered for.
      Overrides:
      getRequiredJavadocTokens in class AbstractJavadocCheck
      Returns:
      the javadoc token set this must be registered for.
      See Also:
    • beginJavadocTree

      public void beginJavadocTree(DetailNode rootAst)
      Description copied from class: AbstractJavadocCheck
      Called before the starting to process a tree.
      Overrides:
      beginJavadocTree in class AbstractJavadocCheck
      Parameters:
      rootAst - the root of the tree
    • visitJavadocToken

      public void visitJavadocToken(DetailNode ast)
      Description copied from class: AbstractJavadocCheck
      Called to process a Javadoc token.
      Specified by:
      visitJavadocToken in class AbstractJavadocCheck
      Parameters:
      ast - the token to process
    • finishJavadocTree

      public void finishJavadocTree(DetailNode rootAst)
      Description copied from class: AbstractJavadocCheck
      Called after finished processing a tree.
      Overrides:
      finishJavadocTree in class AbstractJavadocCheck
      Parameters:
      rootAst - the root of the tree
    • scrapeContent

      public void scrapeContent(DetailNode ast)
      Method containing the core logic of scraping. This keeps track and decides which phase of scraping we are in, and accordingly call other subroutines.
      Parameters:
      ast - javadoc ast
    • getModuleDetailsStore

      public static Map<String,ModuleDetails> getModuleDetailsStore()
      Getter method for moduleDetailsStore.
      Returns:
      map containing module details of supplied checks.
    • isTopLevelClassJavadoc

      public boolean isTopLevelClassJavadoc()
      Check if the current javadoc block comment AST corresponds to the top-level class as we only want to scrape top-level class javadoc.
      Returns:
      true if the current AST corresponds to top level class