Class ImportNode

All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>, NodeMetaDataHandler

public class ImportNode
extends AnnotatedNode
Represents an import statement.
  • Constructor Details

    • ImportNode

      public ImportNode​(ClassNode type, String alias)
      An import of a single type, i.e. import pack.Type or import pack.Type as Alias
      Parameters:
      type - the type reference
      alias - optional alias
    • ImportNode

      public ImportNode​(String packageName)
      An import of all types in a package, i.e. import pack.*
      Parameters:
      packageName - the name of the package
    • ImportNode

      public ImportNode​(ClassNode type)
      An import of all static members of a type, i.e. import static pack.Type.*
      Parameters:
      type - the type reference
    • ImportNode

      public ImportNode​(ClassNode type, String fieldName, String alias)
      An import of a static field or method of a type, i.e. import static pack.Type.name or import static pack.Type.name as alias
      Parameters:
      type - the type reference
      fieldName - the field name
      alias - optional alias
  • Method Details