Class ModelElementFilter
java.lang.Object
net.ssehub.easy.varModel.model.rewrite.modifier.ModelElementFilter
- All Implemented Interfaces:
IModelElementFilter<ContainableModelElement>
public class ModelElementFilter
extends Object
implements IModelElementFilter<ContainableModelElement>
A
IModelElementFilter to specify that a certain sub class of ContainableModelElement should be
generally omitted.- Author:
- El-Sharkawy
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionModelElementFilter(Class<? extends ContainableModelElement> ommitingClass) Default constructor for this class. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends ContainableModelElement> Specification for which kind of classes this may be applied to.handleModelElement(ContainableModelElement element, RewriteContext context) Specification how to handleContainableModelElements.
-
Field Details
-
ommitingClass
-
-
Constructor Details
-
ModelElementFilter
Default constructor for this class.- Parameters:
ommitingClass- The sub class ofContainableModelElement, which shall be filtered while copying aProject.
-
-
Method Details
-
getModifyingModelClass
Description copied from interface:IModelElementFilterSpecification for which kind of classes this may be applied to.- Specified by:
getModifyingModelClassin interfaceIModelElementFilter<ContainableModelElement>- Returns:
- The
ContainableModelElements which shall be modified by this class.
-
handleModelElement
public ContainableModelElement handleModelElement(ContainableModelElement element, RewriteContext context) Description copied from interface:IModelElementFilterSpecification how to handleContainableModelElements.- Specified by:
handleModelElementin interfaceIModelElementFilter<ContainableModelElement>- Parameters:
element- AContainableModelElementwhich 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
nullif the element should be deleted.
-