py4j
Class JVMView
java.lang.Object
py4j.JVMView
public class JVMView
- extends Object
A JVM view keeps track of imports and import searches. A Python client can
have multiple JVM views (e.g., one for each module) so that imports in one
view do not conflict with imports from other views.
JVM views are not hierarchical: they do not inherit from each other so an
import in the default view does not affect the other views.
- Author:
- Barthelemy Dagenais
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAVA_LANG_STAR_IMPORT
public static final String JAVA_LANG_STAR_IMPORT
- See Also:
- Constant Field Values
JVMView
public JVMView(String name,
String id)
addSingleImport
public void addSingleImport(String singleImport)
- Parameters:
singleImport
- Single import statement of the form
package1.package2.SimpleName
addStarImport
public void addStarImport(String starImport)
- Parameters:
starImport
- Star Import of the form "package1.package2.*"
clearImports
public void clearImports()
getId
public String getId()
getLastImportSearches
public Set<String> getLastImportSearches()
getName
public String getName()
getSingleImportsMap
public Map<String,String> getSingleImportsMap()
getStarImports
public Set<String> getStarImports()
removeSingleImport
public boolean removeSingleImport(String importString)
removeStarImport
public boolean removeStarImport(String starImport)
setId
public void setId(String id)
setName
public void setName(String name)