Package org.codehaus.groovy.tools.groovydoc

# Class ExternalGroovyClassDoc

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

All Implemented Interfaces:
  `Comparable<GroovyDoc>`, `GroovyClassDoc`, `GroovyDoc`, `GroovyProgramElementDoc`, `GroovyType`

public class ExternalGroovyClassDoc extends Object implements GroovyClassDoc
Represents a class not in the codebase being processed.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExternalGroovyClassDoc(Class externalClass)`
  Creates a doc entry for the given external (non-source) class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `GroovyAnnotationRef[]`
  `annotations()`
  Returns the annotations declared on this element.
  `String`
  `commentText()`
  Returns the processed comment text for this element.
  `int`
  `compareTo(GroovyDoc o)`
  `GroovyConstructorDoc[]`
  `constructors()`
  Returns the constructors declared by this type.
  `GroovyConstructorDoc[]`
  `constructors(boolean filter)`
  Returns the constructors declared by this type, optionally applying the active visibility filter.
  `GroovyClassDoc`
  `containingClass()`
  Returns the containing class for this element.
  `GroovyPackageDoc`
  `containingPackage()`
  Returns the package that contains this element.
  `boolean`
  `definesSerializableFields()`
  Indicates whether this type explicitly defines serializable fields metadata.
  `GroovyFieldDoc[]`
  `enumConstants()`
  Returns the enum constants declared by this type.
  `boolean`
  `equals(Object other)`
  `Class`
  `externalClass()`
  Returns the underlying reflected class.
  `GroovyFieldDoc[]`
  `fields()`
  Returns the fields declared by this type.
  `GroovyFieldDoc[]`
  `fields(boolean filter)`
  Returns the fields declared by this type, optionally applying the active visibility filter.
  `GroovyClassDoc`
  `findClass(String className)`
  Resolves a referenced class name from the context of this type.
  `String`
  `firstSentenceCommentText()`
  Returns the first sentence of the processed comment text.
  `String`
  `getFullPathName()`
  Returns the documentation output path for this type.
  `String`
  `getRawCommentText()`
  Returns the raw documentation comment for this element.
  `String`
  `getRelativeRootPath()`
  Returns the relative path from this type to the documentation root.
  `String`
  `getTypeSourceDescription()`
  Returns `"interface"` if the external class is an interface; otherwise `"class"`.
  `int`
  `hashCode()`
  `GroovyClassDoc[]`
  `importedClasses()`
  Returns the explicitly imported classes visible to this type.
  `GroovyPackageDoc[]`
  `importedPackages()`
  Returns the imported packages visible to this type.
  `GroovyClassDoc[]`
  `innerClasses()`
  Returns the nested classes declared by this type.
  `GroovyClassDoc[]`
  `innerClasses(boolean filter)`
  Returns the nested classes declared by this type, optionally applying the active visibility filter.
  `GroovyClassDoc[]`
  `interfaces()`
  Returns the interfaces directly implemented or extended by this type.
  `GroovyType[]`
  `interfaceTypes()`
  Returns the interface types directly implemented or extended by this type.
  `boolean`
  `isAbstract()`
  Indicates whether this type is declared abstract.
  `boolean`
  `isAnnotationType()`
  Indicates whether this element represents an annotation type.
  `boolean`
  `isAnnotationTypeElement()`
  Indicates whether this element represents an annotation type member.
  `boolean`
  `isClass()`
  Indicates whether this element represents a class.
  `boolean`
  `isConstructor()`
  Indicates whether this element represents a constructor.
  `boolean`
  `isDeprecated()`
  Indicates whether this element is marked as deprecated.
  `boolean`
  `isEnum()`
  Indicates whether this element represents an enum type.
  `boolean`
  `isEnumConstant()`
  Indicates whether this element represents an enum constant.
  `boolean`
  `isError()`
  Indicates whether this element represents an error type.
  `boolean`
  `isException()`
  Indicates whether this element represents an exception type.
  `boolean`
  `isExternalizable()`
  Indicates whether this type implements `Externalizable`.
  `boolean`
  `isField()`
  Indicates whether this element represents a field.
  `boolean`
  `isFinal()`
  Indicates whether this element is declared `final`.
  `boolean`
  `isIncluded()`
  Indicates whether this element is included in the generated output.
  `boolean`
  `isInterface()`
  Indicates whether this element represents an interface.
  `boolean`
  `isMethod()`
  Indicates whether this element represents a method.
  `boolean`
  `isOrdinaryClass()`
  Indicates whether this element represents an ordinary class.
  `boolean`
  `isPackagePrivate()`
  Indicates whether this element has package-private visibility.
  `boolean`
  `isPrimitive()`
  Indicates whether this type is a Java primitive type.
  `boolean`
  `isPrivate()`
  Indicates whether this element is declared `private`.
  `boolean`
  `isProtected()`
  Indicates whether this element is declared `protected`.
  `boolean`
  `isPublic()`
  Indicates whether this element is declared `public`.
  `boolean`
  `isRecord()`
  Indicates whether this element represents a record type.
  `boolean`
  `isSerializable()`
  Indicates whether this type implements `Serializable`.
  `boolean`
  `isStatic()`
  Indicates whether this element is declared `static`.
  `GroovyMethodDoc[]`
  `methods()`
  Returns the methods declared by this type.
  `GroovyMethodDoc[]`
  `methods(boolean filter)`
  Returns the methods declared by this type, optionally applying the active visibility filter.
  `String`
  `modifiers()`
  Returns the rendered modifier text for this element.
  `int`
  `modifierSpecifier()`
  Returns the modifier flags for this element.
  `String`
  `name()`
  Returns the simple name of this documented element.
  `GroovyFieldDoc[]`
  `properties()`
  Returns the Groovy properties declared by this type.
  `String`
  `qualifiedName()`
  Returns the fully qualified name of this element.
  `String`
  `qualifiedTypeName()`
  The qualified name of this type excluding any dimension information.
  `GroovyFieldDoc[]`
  `serializableFields()`
  Returns the fields that participate in serialization.
  `GroovyMethodDoc[]`
  `serializationMethods()`
  Returns the methods related to custom serialization.
  `void`
  `setRawCommentText(String arg0)`
  Replaces the raw documentation comment for this element.
  `String`
  `simpleTypeName()`
  The unqualified name of this type excluding any dimension or nesting information.
  `boolean`
  `subclassOf(GroovyClassDoc gcd)`
  Determines whether this type is a subclass of the supplied candidate.
  `GroovyClassDoc`
  `superclass()`
  Returns the direct superclass of this type.
  `GroovyType`
  `superclassType()`
  Returns the direct superclass as a type reference.
  `String`
  `typeName()`
  The unqualified name of this type excluding any dimension information.

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

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

  ### Methods inherited from interface org.codehaus.groovy.groovydoc.GroovyType

  `toString`

- ## Constructor Details

  - ### ExternalGroovyClassDoc

    public ExternalGroovyClassDoc(Class externalClass)
    Creates a doc entry for the given external (non-source) class.
    Parameters:
      `externalClass` - the reflected class to represent

- ## Method Details

  - ### isPrimitive

    public boolean isPrimitive()
    Indicates whether this type is a Java primitive type.
    Specified by:
      `isPrimitive` in interface `GroovyType`
    Returns:
      `true` if this type is primitive

  - ### annotations

    public GroovyAnnotationRef[] annotations()
    Returns the annotations declared on this element.
    Specified by:
      `annotations` in interface `GroovyProgramElementDoc`
    Returns:
      the declared annotations

  - ### qualifiedTypeName

    public String qualifiedTypeName()
    The qualified name of this type excluding any dimension information. For example, a two-dimensional array of String returns "`java.lang.String`".
    Specified by:
      `qualifiedTypeName` in interface `GroovyType`

  - ### superclass

    public GroovyClassDoc superclass()
    Returns the direct superclass of this type.
    Specified by:
      `superclass` in interface `GroovyClassDoc`
    Returns:
      the direct superclass, or `null` if none exists

  - ### externalClass

    public Class externalClass()
    Returns the underlying reflected class.

  - ### getTypeSourceDescription

    public String getTypeSourceDescription()
    Returns `"interface"` if the external class is an interface; otherwise `"class"`.

  - ### simpleTypeName

    public String simpleTypeName()
    The unqualified name of this type excluding any dimension or nesting information. For example, the class `Outer.Inner` returns "`Inner`".
    Specified by:
      `simpleTypeName` in interface `GroovyType`

  - ### typeName

    public String typeName()
    The unqualified name of this type excluding any dimension information. For example, a two-dimensional array of String returns "`String`".
    Specified by:
      `typeName` in interface `GroovyType`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object other)
    Overrides:
      `equals` in class `Object`

  - ### superclassType

    public GroovyType superclassType()
    Returns the direct superclass as a type reference.
    Specified by:
      `superclassType` in interface `GroovyClassDoc`
    Returns:
      the direct superclass type, or `null` if none exists

  - ### constructors

    public GroovyConstructorDoc[] constructors()
    Returns the constructors declared by this type.
    Specified by:
      `constructors` in interface `GroovyClassDoc`
    Returns:
      the declared constructors

  - ### constructors

    public GroovyConstructorDoc[] constructors(boolean filter)
    Returns the constructors declared by this type, optionally applying the active visibility filter.
    Specified by:
      `constructors` in interface `GroovyClassDoc`
    Parameters:
      `filter` - `true` to include only visible constructors, `false` to include all constructors
    Returns:
      the matching constructors

  - ### definesSerializableFields

    public boolean definesSerializableFields()
    Indicates whether this type explicitly defines serializable fields metadata.
    Specified by:
      `definesSerializableFields` in interface `GroovyClassDoc`
    Returns:
      `true` if serializable fields are defined explicitly

  - ### enumConstants

    public GroovyFieldDoc[] enumConstants()
    Returns the enum constants declared by this type.
    Specified by:
      `enumConstants` in interface `GroovyClassDoc`
    Returns:
      the declared enum constants

  - ### fields

    public GroovyFieldDoc[] fields()
    Returns the fields declared by this type.
    Specified by:
      `fields` in interface `GroovyClassDoc`
    Returns:
      the declared fields

  - ### properties

    public GroovyFieldDoc[] properties()
    Returns the Groovy properties declared by this type.
    Specified by:
      `properties` in interface `GroovyClassDoc`
    Returns:
      the declared properties

  - ### fields

    public GroovyFieldDoc[] fields(boolean filter)
    Returns the fields declared by this type, optionally applying the active visibility filter.
    Specified by:
      `fields` in interface `GroovyClassDoc`
    Parameters:
      `filter` - `true` to include only visible fields, `false` to include all fields
    Returns:
      the matching fields

  - ### findClass

    public GroovyClassDoc findClass(String className)
    Resolves a referenced class name from the context of this type.
    Specified by:
      `findClass` in interface `GroovyClassDoc`
    Parameters:
      `className` - the class name to resolve
    Returns:
      the matching class documentation, or `null` if it cannot be resolved

  - ### importedClasses

    public GroovyClassDoc[] importedClasses()
    Returns the explicitly imported classes visible to this type.
    Specified by:
      `importedClasses` in interface `GroovyClassDoc`
    Returns:
      the imported classes

  - ### importedPackages

    public GroovyPackageDoc[] importedPackages()
    Returns the imported packages visible to this type.
    Specified by:
      `importedPackages` in interface `GroovyClassDoc`
    Returns:
      the imported packages

  - ### innerClasses

    public GroovyClassDoc[] innerClasses()
    Returns the nested classes declared by this type.
    Specified by:
      `innerClasses` in interface `GroovyClassDoc`
    Returns:
      the nested classes

  - ### innerClasses

    public GroovyClassDoc[] innerClasses(boolean filter)
    Returns the nested classes declared by this type, optionally applying the active visibility filter.
    Specified by:
      `innerClasses` in interface `GroovyClassDoc`
    Parameters:
      `filter` - `true` to include only visible nested classes, `false` to include all nested classes
    Returns:
      the matching nested classes

  - ### interfaces

    public GroovyClassDoc[] interfaces()
    Returns the interfaces directly implemented or extended by this type.
    Specified by:
      `interfaces` in interface `GroovyClassDoc`
    Returns:
      the direct interfaces

  - ### interfaceTypes

    public GroovyType[] interfaceTypes()
    Returns the interface types directly implemented or extended by this type.
    Specified by:
      `interfaceTypes` in interface `GroovyClassDoc`
    Returns:
      the direct interface types

  - ### isAbstract

    public boolean isAbstract()
    Indicates whether this type is declared abstract.
    Specified by:
      `isAbstract` in interface `GroovyClassDoc`
    Returns:
      `true` if this type is abstract

  - ### isExternalizable

    public boolean isExternalizable()
    Indicates whether this type implements `Externalizable`.
    Specified by:
      `isExternalizable` in interface `GroovyClassDoc`
    Returns:
      `true` if this type is externalizable

  - ### isSerializable

    public boolean isSerializable()
    Indicates whether this type implements `Serializable`.
    Specified by:
      `isSerializable` in interface `GroovyClassDoc`
    Returns:
      `true` if this type is serializable

  - ### methods

    public GroovyMethodDoc[] methods()
    Returns the methods declared by this type.
    Specified by:
      `methods` in interface `GroovyClassDoc`
    Returns:
      the declared methods

  - ### methods

    public GroovyMethodDoc[] methods(boolean filter)
    Returns the methods declared by this type, optionally applying the active visibility filter.
    Specified by:
      `methods` in interface `GroovyClassDoc`
    Parameters:
      `filter` - `true` to include only visible methods, `false` to include all methods
    Returns:
      the matching methods

  - ### serializableFields

    public GroovyFieldDoc[] serializableFields()
    Returns the fields that participate in serialization.
    Specified by:
      `serializableFields` in interface `GroovyClassDoc`
    Returns:
      the serializable fields

  - ### serializationMethods

    public GroovyMethodDoc[] serializationMethods()
    Returns the methods related to custom serialization.
    Specified by:
      `serializationMethods` in interface `GroovyClassDoc`
    Returns:
      the serialization methods

  - ### subclassOf

    public boolean subclassOf(GroovyClassDoc gcd)
    Determines whether this type is a subclass of the supplied candidate.
    Specified by:
      `subclassOf` in interface `GroovyClassDoc`
    Parameters:
      `gcd` - the candidate superclass
    Returns:
      `true` if this type is a subclass of `gcd`

  - ### getFullPathName

    public String getFullPathName()
    Returns the documentation output path for this type.
    Specified by:
      `getFullPathName` in interface `GroovyClassDoc`
    Returns:
      the full path used when rendering this type

  - ### getRelativeRootPath

    public String getRelativeRootPath()
    Returns the relative path from this type to the documentation root.
    Specified by:
      `getRelativeRootPath` in interface `GroovyClassDoc`
    Returns:
      the relative path to the documentation root

  - ### containingClass

    public GroovyClassDoc containingClass()
    Returns the containing class for this element.
    Specified by:
      `containingClass` in interface `GroovyProgramElementDoc`
    Returns:
      the containing class, or `null` if this element is not nested within a class

  - ### containingPackage

    public GroovyPackageDoc containingPackage()
    Returns the package that contains this element.
    Specified by:
      `containingPackage` in interface `GroovyProgramElementDoc`
    Returns:
      the containing package, or `null` if none is available

  - ### isFinal

    public boolean isFinal()
    Indicates whether this element is declared `final`.
    Specified by:
      `isFinal` in interface `GroovyProgramElementDoc`
    Returns:
      `true` if this element is final

  - ### isPackagePrivate

    public boolean isPackagePrivate()
    Indicates whether this element has package-private visibility.
    Specified by:
      `isPackagePrivate` in interface `GroovyProgramElementDoc`
    Returns:
      `true` if this element is package-private

  - ### isPrivate

    public boolean isPrivate()
    Indicates whether this element is declared `private`.
    Specified by:
      `isPrivate` in interface `GroovyProgramElementDoc`
    Returns:
      `true` if this element is private

  - ### isProtected

    public boolean isProtected()
    Indicates whether this element is declared `protected`.
    Specified by:
      `isProtected` in interface `GroovyProgramElementDoc`
    Returns:
      `true` if this element is protected

  - ### isPublic

    public boolean isPublic()
    Indicates whether this element is declared `public`.
    Specified by:
      `isPublic` in interface `GroovyProgramElementDoc`
    Returns:
      `true` if this element is public

  - ### isStatic

    public boolean isStatic()
    Indicates whether this element is declared `static`.
    Specified by:
      `isStatic` in interface `GroovyProgramElementDoc`
    Returns:
      `true` if this element is static

  - ### modifiers

    public String modifiers()
    Returns the rendered modifier text for this element.
    Specified by:
      `modifiers` in interface `GroovyProgramElementDoc`
    Returns:
      the modifier text

  - ### modifierSpecifier

    public int modifierSpecifier()
    Returns the modifier flags for this element.
    Specified by:
      `modifierSpecifier` in interface `GroovyProgramElementDoc`
    Returns:
      the modifier bit set

  - ### qualifiedName

    public String qualifiedName()
    Returns the fully qualified name of this element.
    Specified by:
      `qualifiedName` in interface `GroovyProgramElementDoc`
    Returns:
      the qualified name

  - ### commentText

    public String commentText()
    Returns the processed comment text for this element.
    Specified by:
      `commentText` in interface `GroovyDoc`
    Returns:
      the rendered comment text

  - ### getRawCommentText

    public String getRawCommentText()
    Returns the raw documentation comment for this element.
    Specified by:
      `getRawCommentText` in interface `GroovyDoc`
    Returns:
      the raw comment text

  - ### isAnnotationType

    public boolean isAnnotationType()
    Indicates whether this element represents an annotation type.
    Specified by:
      `isAnnotationType` in interface `GroovyDoc`
    Returns:
      `true` if this element is an annotation type

  - ### isAnnotationTypeElement

    public boolean isAnnotationTypeElement()
    Indicates whether this element represents an annotation type member.
    Specified by:
      `isAnnotationTypeElement` in interface `GroovyDoc`
    Returns:
      `true` if this element is an annotation type element

  - ### isClass

    public boolean isClass()
    Indicates whether this element represents a class.
    Specified by:
      `isClass` in interface `GroovyDoc`
    Returns:
      `true` if this element is a class

  - ### isConstructor

    public boolean isConstructor()
    Indicates whether this element represents a constructor.
    Specified by:
      `isConstructor` in interface `GroovyDoc`
    Returns:
      `true` if this element is a constructor

  - ### isDeprecated

    public boolean isDeprecated()
    Indicates whether this element is marked as deprecated.
    Specified by:
      `isDeprecated` in interface `GroovyDoc`
    Returns:
      `true` if this element is deprecated

  - ### isEnum

    public boolean isEnum()
    Indicates whether this element represents an enum type.
    Specified by:
      `isEnum` in interface `GroovyDoc`
    Returns:
      `true` if this element is an enum

  - ### isRecord

    public boolean isRecord()
    Indicates whether this element represents a record type.
    Specified by:
      `isRecord` in interface `GroovyDoc`
    Returns:
      `true` if this element is a record

  - ### isEnumConstant

    public boolean isEnumConstant()
    Indicates whether this element represents an enum constant.
    Specified by:
      `isEnumConstant` in interface `GroovyDoc`
    Returns:
      `true` if this element is an enum constant

  - ### isError

    public boolean isError()
    Indicates whether this element represents an error type.
    Specified by:
      `isError` in interface `GroovyDoc`
    Returns:
      `true` if this element is an error

  - ### isException

    public boolean isException()
    Indicates whether this element represents an exception type.
    Specified by:
      `isException` in interface `GroovyDoc`
    Returns:
      `true` if this element is an exception

  - ### isField

    public boolean isField()
    Indicates whether this element represents a field.
    Specified by:
      `isField` in interface `GroovyDoc`
    Returns:
      `true` if this element is a field

  - ### isIncluded

    public boolean isIncluded()
    Indicates whether this element is included in the generated output.
    Specified by:
      `isIncluded` in interface `GroovyDoc`
    Returns:
      `true` if this element is included

  - ### isInterface

    public boolean isInterface()
    Indicates whether this element represents an interface.
    Specified by:
      `isInterface` in interface `GroovyDoc`
    Returns:
      `true` if this element is an interface

  - ### isMethod

    public boolean isMethod()
    Indicates whether this element represents a method.
    Specified by:
      `isMethod` in interface `GroovyDoc`
    Returns:
      `true` if this element is a method

  - ### isOrdinaryClass

    public boolean isOrdinaryClass()
    Indicates whether this element represents an ordinary class.
    Specified by:
      `isOrdinaryClass` in interface `GroovyDoc`
    Returns:
      `true` if this element is an ordinary class

  - ### name

    public String name()
    Returns the simple name of this documented element.
    Specified by:
      `name` in interface `GroovyDoc`
    Returns:
      the element name

  - ### setRawCommentText

    public void setRawCommentText(String arg0)
    Replaces the raw documentation comment for this element.
    Specified by:
      `setRawCommentText` in interface `GroovyDoc`
    Parameters:
      `arg0` - the raw comment text to store

  - ### firstSentenceCommentText

    public String firstSentenceCommentText()
    Returns the first sentence of the processed comment text.
    Specified by:
      `firstSentenceCommentText` in interface `GroovyDoc`
    Returns:
      the first sentence summary

  - ### compareTo

    public int compareTo(GroovyDoc o)
    Specified by:
      `compareTo` in interface `Comparable<GroovyDoc>`