Class GroovyPackageElement

All Implemented Interfaces:
AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, Described, Named, MutableAnnotationMetadataDelegate<Element>, Element, PackageElement

@Internal public class GroovyPackageElement extends AbstractGroovyElement implements PackageElement
A class element returning data from a PackageNode.
Since:
2.0
Author:
Graeme Rocher
  • Constructor Details

    • GroovyPackageElement

      public GroovyPackageElement(GroovyVisitorContext visitorContext, org.codehaus.groovy.ast.PackageNode packageNode, ElementAnnotationMetadataFactory annotationMetadataFactory)
      Default constructor.
      Parameters:
      visitorContext - The visitor context
      packageNode - The annotated node
      annotationMetadataFactory - The annotation metadata
  • Method Details

    • copyConstructor

      protected AbstractGroovyElement copyConstructor()
      Description copied from class: AbstractGroovyElement
      Constructs this element by invoking the constructor.
      Specified by:
      copyConstructor in class AbstractGroovyElement
      Returns:
      the copy
    • getName

      @NonNull public @NonNull String getName()
      Specified by:
      getName in interface Element
      Specified by:
      getName in interface Named
      Returns:
      The name of the element. For a type this represents the binary name.
    • getSimpleName

      public String getSimpleName()
      Description copied from interface: Element
      The simple name of the element. For a class this will be the name without the package.
      Specified by:
      getSimpleName in interface Element
      Returns:
      The simple name
    • isProtected

      public boolean isProtected()
      Specified by:
      isProtected in interface Element
      Returns:
      True if the element is protected.
    • isPublic

      public boolean isPublic()
      Specified by:
      isPublic in interface Element
      Returns:
      True if the element is public.