An artificial expression representing an import
Gets the name by which the lowest level module or package is imported. NOTE: This is the name that used to import the module, which may not be the name of the module.
Gets an immediate (non-nested) sub-expression of this expression
Gets the names of the modules that may be imported by this import. For example this predicate would return ‘x’ and ‘x.y’ for
Gets the full name of the module resulting from evaluating this import. NOTE: This is the name that used to import the module, which may not be the name of the module.
The language specifies level as -1 if relative imports are to be tried first, 0 for absolute imports, and level > 0 for explicit relative imports.
Whether this expression may have a side effect (as determined purely from its syntax)
Whether this import is relative, that is not absolute. See https://www.python.org/dev/peps/pep-0328/
Gets the name of topmost module or package being imported
Whether this contains
Whether this contains
Whether this expression defines variable
Gets a child node of this node in the AST. This predicate exists to aid exploration of the AST and other experiments. The child-parent relation may not be meaningful. For a more meaningful relation in terms of dependency use Expr.getASubExpression(), Stmt.getASubStatement(), Stmt.getASubExpression() or Scope.getAStmt().
Gets a flow node corresponding directly to this node. NOTE: For some statements and other purely syntactic elements, there may not be a
Gets the module in which this expression occurs
Gets the name of this import expression.
Gets the parent node of this node in the AST. This predicate exists to aid exploration of the AST and other experiments. The child-parent relation may not be meaningful. For a more meaningful relation in terms of dependency use Expr.getASubExpression(), Stmt.getASubStatement(), Stmt.getASubExpression() or Scope.getAStmt() applied to the parent.
Gets the scope of this expression
Whether this syntactic element is artificial, that is it is generated by the compiler and is not present in the source
Whether this expression is a constant
Use isParenthesized instead.
Whether the parenthesized property of this expression is true.
Whether the top level property of this import expression is true.
Gets what this expression might “refer-to”. Performs a combination of localized (intra-procedural) points-to analysis and global module-level analysis. This points-to analysis favours precision over recall. It is highly precise, but may not provide information for a significant number of flow-nodes. If the class is unimportant then use
Gets what this expression might “refer-to” in the given
Whether this expression might “refer-to” to
Use StrConst.getText() instead