class ClassImportRule extends AbstractImportRule
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
className
Package to control access to.
|
Constructor and Description |
---|
ClassImportRule(boolean allow,
boolean localOnly,
java.lang.String className,
boolean regExp)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
AccessResult |
verifyImport(java.lang.String forImport)
Verifies whether a class name is used.
|
calculateResult, isLocalOnly, isRegExp
ClassImportRule(boolean allow, boolean localOnly, java.lang.String className, boolean regExp)
allow
- whether to allow access.localOnly
- whether the rule is to be applied locally onlyclassName
- the class to apply the rule on.regExp
- whether the class name is to be interpreted as a regular
expression.public AccessResult verifyImport(java.lang.String forImport)
verifyImport
in class AbstractImportRule
forImport
- the import to check.AccessResult
indicating whether it can be used.