Class ImportRegExNameFilter
java.lang.Object
net.ssehub.easy.varModel.model.rewrite.modifier.ImportRegExNameFilter
- All Implemented Interfaces:
IProjectImportFilter
Import filter based on a
Java regular expression.
- Author:
- El-Sharkawy
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionImportRegExNameFilter(String regexFilter, boolean whitelist) Default constructor for this class. -
Method Summary
Modifier and TypeMethodDescriptionhandleImport(ProjectImport pImport, RewriteContext context) Specification how to handleProjectImports.
-
Field Details
-
regexFilter
-
whitelist
private boolean whitelist
-
-
Constructor Details
-
ImportRegExNameFilter
Default constructor for this class.- Parameters:
regexFilter- The regular expression which shall be used for filtering.whitelist-truethe given names will be kept and all others will be filtered out (whitelist filtering),falsethe given names will be filtered out and all others will be kept (blacklist filtering).
-
-
Method Details
-
handleImport
Description copied from interface:IProjectImportFilterSpecification how to handleProjectImports.- Specified by:
handleImportin interfaceIProjectImportFilter- Parameters:
pImport- AProjectImportwhich may be modified by this class.context- Knowledge of the current translation, comes from theProjectRewriteVisitor.- Returns:
- The modified element. Maybe the same instance as passed as parameter (if nothing should be changed) or null if the element should be deleted.
-