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
public class ImportFromImpl extends SimpleStatement implements ImportFrom
-
-
Field Summary
-
Fields inherited from class org.sonar.python.tree.PyTree
firstToken, lastToken
-
-
Constructor Summary
Constructors Constructor Description ImportFromImpl(Token fromKeyword, List<Token> dottedPrefixForModule, DottedName moduleName, Token importKeyword, List<AliasedName> aliasedImportNames, Token wildcard, Separators separators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TreeVisitor visitor)List<Tree>computeChildren()List<Token>dottedPrefixForModule()TokenfromKeyword()Tree.KindgetKind()List<AliasedName>importedNames()TokenimportKeyword()booleanisWildcardImport()DottedNamemodule()Tokenseparator()Tokenwildcard()-
Methods inherited from class org.sonar.python.tree.SimpleStatement
lastToken
-
Methods inherited from class org.sonar.python.tree.PyTree
children, firstToken, is, parent, setParent
-
-
-
-
Constructor Detail
-
ImportFromImpl
public ImportFromImpl(Token fromKeyword, @Nullable List<Token> dottedPrefixForModule, @Nullable DottedName moduleName, Token importKeyword, @Nullable List<AliasedName> aliasedImportNames, @Nullable Token wildcard, Separators separators)
-
-
Method Detail
-
fromKeyword
public Token fromKeyword()
- Specified by:
fromKeywordin interfaceImportFrom
-
module
@CheckForNull public DottedName module()
- Specified by:
modulein interfaceImportFrom
-
importKeyword
public Token importKeyword()
- Specified by:
importKeywordin interfaceImportFrom
-
dottedPrefixForModule
@CheckForNull public List<Token> dottedPrefixForModule()
- Specified by:
dottedPrefixForModulein interfaceImportFrom
-
importedNames
public List<AliasedName> importedNames()
- Specified by:
importedNamesin interfaceImportFrom
-
isWildcardImport
public boolean isWildcardImport()
- Specified by:
isWildcardImportin interfaceImportFrom
-
wildcard
@CheckForNull public Token wildcard()
- Specified by:
wildcardin interfaceImportFrom
-
separator
@CheckForNull public Token separator()
-
accept
public void accept(TreeVisitor visitor)
-
-