Interface IPythonCodeArtifact
- All Known Implementing Classes:
PythonCodeArtifact
public interface IPythonCodeArtifact
Declares a code artifact.
- Author:
- Kevin Schaperjahn
-
Method Summary
Modifier and TypeMethodDescriptionAdds a function.Adds a function.Adds a simple import.Adds a module-based import.voidMoves the given import after the last import at the beginning of (this) artifact, or, if there are no imports, to the front.voidregisterImport(IPythonCodeImport imp, boolean explicit) validateFuncCall(String name, PythonCodeImportScope scope) void
-
Method Details
-
validateType
-
validateFuncCall
-
registerImport
-
addImport
Adds a simple import.- Parameters:
imp- the import- Returns:
- the import (for chaining)
-
addImport
Adds a module-based import.- Parameters:
from- the owning moduleimp- the import- Returns:
- the import (for chaining)
-
addFunc
Adds a function.- Parameters:
name- the name of the function- Returns:
- the function (for chaining)
-
addFunc
Adds a function.- Parameters:
name- the name of the functioncomment- the documentation comment of the function- Returns:
- the function (for chaining)
-
moveToImports
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
-