Class AtclauseOrderCheck

All Implemented Interfaces:
Configurable, Contextualizable

public class AtclauseOrderCheck extends AbstractJavadocCheck

Note: Google used the term "at-clauses" for block tags in their guide till 2017-02-28.

Since:
6.0
  • Field Details

    • MSG_KEY

      public static final String MSG_KEY
      A key is pointing to the warning message text in "messages.properties" file.
      See Also:
    • DEFAULT_ORDER

      private static final String[] DEFAULT_ORDER
      Default order of atclauses.
    • target

      private BitSet target
      Specify block tags targeted.
    • tagOrder

      @PreserveOrder private List<String> tagOrder
      Specify the order by tags. Default value is @author, @version, @param, @return, @throws, @exception, @see, @since, @serial, @serialField, @serialData, @deprecated.
  • Constructor Details

    • AtclauseOrderCheck

      public AtclauseOrderCheck()
  • Method Details

    • setTarget

      public void setTarget(String... targets)
      Setter to specify block tags targeted.
      Parameters:
      targets - user's targets.
      Since:
      6.0
    • setTagOrder

      public void setTagOrder(String... orders)
      Setter to specify the order by tags.
      Parameters:
      orders - user's orders.
      Since:
      6.0
    • 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:
    • 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
    • checkOrderInTagSection

      private void checkOrderInTagSection(DetailNode javadoc)
      Checks order of atclauses in tag section node.
      Parameters:
      javadoc - Javadoc root node.
    • getParentType

      private static int getParentType(DetailAST commentBlock)
      Returns type of parent node.
      Parameters:
      commentBlock - child node.
      Returns:
      parent type.