Class ImportRegExNameFilter
- java.lang.Object
-
- net.ssehub.easy.varModel.model.rewrite.modifier.ImportRegExNameFilter
-
- All Implemented Interfaces:
IProjectImportFilter
public class ImportRegExNameFilter extends java.lang.Object implements IProjectImportFilter
Import filter based on a Java regular expression.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringregexFilterprivate booleanwhitelist
-
Constructor Summary
Constructors Constructor Description ImportRegExNameFilter(java.lang.String regexFilter, boolean whitelist)Default constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProjectImporthandleImport(ProjectImport pImport, RewriteContext context)Specification how to handleProjectImports.
-
-
-
Constructor Detail
-
ImportRegExNameFilter
public ImportRegExNameFilter(java.lang.String regexFilter, boolean whitelist)Default constructor for this class.- Parameters:
regexFilter- The regular expression which shall be used for filtering.whitelist- true the given names will be kept and all others will be filtered out (whitelist filtering), false the given names will be filtered out and all others will be kept (blacklist filtering).
-
-
Method Detail
-
handleImport
public ProjectImport handleImport(ProjectImport pImport, RewriteContext context)
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.
-
-