Package jetbrains.mps.java.stub
Class PackageScopeControl
- java.lang.Object
 - 
- jetbrains.mps.java.stub.PackageScopeControl
 
 
- 
public final class PackageScopeControl extends Object
Manage access to a subset of packages available from a source (e.g. model root) and classes in these packages. Comes handy when we want to control set of packages coming from a well-known classpath item, e.g. Java SDK classes, when we want to expose only specific, public APIs. 
- 
- 
Constructor Summary
Constructors Constructor Description PackageScopeControl() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexcludeWithPrefix(String packageNamePrefix)voidincludeWithPrefix(String packageNamePrefix)Package name prefix.booleanisAnyChildIncluded(String qualifiedPackageName)Checking if any of sub-packages of this package is included bymyIncludePrefixbooleanisIncluded(String qualifiedPackageName)First, package name is checked for inclusion, then for exclusion (so thatinclude("com"); exclude("com.b.")would allowcom.a.A,com.Dand forbidcom.b.C.booleanisSkipPrivate()voidload(Memento memento)voidsave(Memento memento)voidsetSkipPrivate(boolean skipPrivate) 
 - 
 
- 
- 
Method Detail
- 
save
public void save(Memento memento)
 
- 
load
public void load(Memento memento)
 
- 
includeWithPrefix
public void includeWithPrefix(@NotNull String packageNamePrefix)
Package name prefix. To match exact package, not any starting with the prefix, don't forget to put dot in the end of the prefix (e.g. "org.com." not to match "org.common")- Parameters:
 packageNamePrefix- qualified package name prefix to match
 
- 
isSkipPrivate
public boolean isSkipPrivate()
 
- 
setSkipPrivate
public void setSkipPrivate(boolean skipPrivate)
 
- 
isIncluded
public boolean isIncluded(@NotNull String qualifiedPackageName)
First, package name is checked for inclusion, then for exclusion (so thatinclude("com"); exclude("com.b.")would allowcom.a.A,com.Dand forbidcom.b.C.- Parameters:
 qualifiedPackageName- package to check for scope- Returns:
 - true if package deemed part of the scope
 
 
- 
isAnyChildIncluded
public boolean isAnyChildIncluded(@NotNull String qualifiedPackageName)
Checking if any of sub-packages of this package is included bymyIncludePrefix- Parameters:
 qualifiedPackageName- package to check for scope- Returns:
 - true if at least one of child packages may be included
 
 
 - 
 
 -