Interface IPythonCodeArtifact

All Known Implementing Classes:
PythonCodeArtifact

public interface IPythonCodeArtifact
Declares a code artifact.
Author:
Kevin Schaperjahn
  • Method Details

    • validateType

      void validateType(IPythonCodeTypeSpec type)
    • validateFuncCall

      String validateFuncCall(String name, PythonCodeImportScope scope)
    • registerImport

      void registerImport(IPythonCodeImport imp, boolean explicit)
    • addImport

      PythonCodeImport addImport(String imp)
      Adds a simple import.
      Parameters:
      imp - the import
      Returns:
      the import (for chaining)
    • addImport

      PythonCodeImport addImport(String from, String imp)
      Adds a module-based import.
      Parameters:
      from - the owning module
      imp - the import
      Returns:
      the import (for chaining)
    • addFunc

      PythonCodeFunction addFunc(String name)
      Adds a function.
      Parameters:
      name - the name of the function
      Returns:
      the function (for chaining)
    • addFunc

      PythonCodeFunction addFunc(String name, String comment)
      Adds a function.
      Parameters:
      name - the name of the function
      comment - the documentation comment of the function
      Returns:
      the function (for chaining)
    • moveToImports

      void moveToImports(IPythonCodeImport imp)
      Moves the given import after the last import at the beginning of (this) artifact, or, if there are no imports, to the front.
      Parameters:
      imp - the import to move