Package org.codehaus.groovy.tools.groovydoc

# Class GroovydocAnnotationUtils

java.lang.Object
org.codehaus.groovy.tools.groovydoc.GroovydocAnnotationUtils

public final class GroovydocAnnotationUtils extends Object
Utilities shared between `GroovydocVisitor` (Groovy AST) and `GroovydocJavaVisitor` (JavaParser AST). Kept narrow on purpose: only logic that is genuinely pure (no AST-type dependency) belongs here. Everything else is parallel in both visitors because their input AST types are fundamentally different hierarchies and the adapter layer needed to unify them would cost more than the duplication it saves.

Since:
  6.0.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static boolean`
  `shouldDocument(String fqn)`
  GROOVY-4634: emit an annotation reference only when the annotation type is itself marked `Documented`, matching Javadoc's behavior.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### shouldDocument

    public static boolean shouldDocument(String fqn)
    GROOVY-4634: emit an annotation reference only when the annotation type is itself marked `Documented`, matching Javadoc's behavior. When the annotation type cannot be resolved on the current classpath (common for user-defined annotations in the source tree being documented), default to `true` so that groovydoc does not silently drop user annotations.

    Takes a fully-qualified annotation type name and returns `true` when the annotation should be shown in the rendered documentation.