Package org.sonar.python.tree
Class ImportFromImpl
java.lang.Object
org.sonar.python.tree.PyTree
org.sonar.python.tree.SimpleStatement
org.sonar.python.tree.ImportFromImpl
- All Implemented Interfaces:
ImportFrom,ImportStatement,Statement,Tree
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.sonar.python.tree.PyTree
firstToken, lastToken -
Constructor Summary
ConstructorsConstructorDescriptionImportFromImpl(Token fromKeyword, List<Token> dottedPrefixForModule, DottedName moduleName, Token importKeyword, List<AliasedName> aliasedImportNames, Token wildcard, Separators separators) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(TreeVisitor visitor) prefix '.' tokens used in relative importgetKind()booleanbooleanmodule()voidsetHasUnresolvedWildcardImport(boolean hasUnresolvedWildcardImport) wildcard()Methods inherited from class org.sonar.python.tree.SimpleStatement
lastTokenMethods inherited from class org.sonar.python.tree.PyTree
children, firstToken, is, parent, setParent
-
Constructor Details
-
ImportFromImpl
public ImportFromImpl(Token fromKeyword, @Nullable List<Token> dottedPrefixForModule, @Nullable DottedName moduleName, Token importKeyword, @Nullable List<AliasedName> aliasedImportNames, @Nullable Token wildcard, Separators separators)
-
-
Method Details
-
fromKeyword
- Specified by:
fromKeywordin interfaceImportFrom
-
module
- Specified by:
modulein interfaceImportFrom
-
importKeyword
- Specified by:
importKeywordin interfaceImportFrom
-
dottedPrefixForModule
Description copied from interface:ImportFromprefix '.' tokens used in relative importfrom ..a.b import fn # ^^
- Specified by:
dottedPrefixForModulein interfaceImportFrom
-
importedNames
- Specified by:
importedNamesin interfaceImportFrom
-
isWildcardImport
public boolean isWildcardImport()- Specified by:
isWildcardImportin interfaceImportFrom
-
wildcard
- Specified by:
wildcardin interfaceImportFrom
-
hasUnresolvedWildcardImport
public boolean hasUnresolvedWildcardImport()- Specified by:
hasUnresolvedWildcardImportin interfaceImportFrom
-
setHasUnresolvedWildcardImport
public void setHasUnresolvedWildcardImport(boolean hasUnresolvedWildcardImport) -
separator
-
getKind
-
accept
-
computeChildren
-