Class ProjectFilter
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.vilTypes.configuration.ProjectFilter
-
- All Implemented Interfaces:
IConfigurationFilter
class ProjectFilter extends java.lang.Object implements IConfigurationFilter
A project-based filter, i.e., allelementscontained in a project shall be included by this filter.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private booleanconsiderImportsprivate IConfigurationFilterfurtherprivate Projectproject
-
Constructor Summary
Constructors Constructor Description ProjectFilter(Project project, boolean considerImports)Creates a filter.ProjectFilter(Project project, boolean considerImports, IConfigurationFilter further)Creates a filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleancheckFurther(IvmlElement element, boolean result)Checks whetherfurtherapplies.booleaninclude(IvmlElement element)Returns whether a given element shall be included.private booleaninclude(IvmlElement element, Project project, java.util.Set<Project> done)Checks whetherelementshall be included due to its membership inproject.
-
-
-
Field Detail
-
project
private Project project
-
considerImports
private boolean considerImports
-
further
private IConfigurationFilter further
-
-
Constructor Detail
-
ProjectFilter
public ProjectFilter(Project project, boolean considerImports)
Creates a filter.- Parameters:
project- the project to filter forconsiderImports- the imports ofproject
-
ProjectFilter
public ProjectFilter(Project project, boolean considerImports, IConfigurationFilter further)
Creates a filter.- Parameters:
project- the project to filter for (may be null, then the filter rejects all elements)considerImports- the imports ofprojectfurther- an (optional) filter to be considered (may be null)
-
-
Method Detail
-
include
private boolean include(IvmlElement element, Project project, java.util.Set<Project> done)
Checks whetherelementshall be included due to its membership inproject.- Parameters:
element- the element to considerproject- the project to ask forelementdone- already considered projects to control cyclic imports- Returns:
trueifelementshall be included,falseelse
-
include
public boolean include(IvmlElement element)
Description copied from interface:IConfigurationFilterReturns whether a given element shall be included.- Specified by:
includein interfaceIConfigurationFilter- Parameters:
element- the element to be tested- Returns:
trueifelementshall be included,falseelse
-
checkFurther
private boolean checkFurther(IvmlElement element, boolean result)
Checks whetherfurtherapplies.- Parameters:
element- the element to be testedresult- the result determined for includingelementso far- Returns:
trueifelementshall be included,falseelse
-
-