Class ValueCopy
java.lang.Object
net.ssehub.easy.varModel.model.rewrite.ValueCopy
- All Implemented Interfaces:
IValueVisitor
Filters a given
Value and creates a copy without filtered elements.- Author:
- El-Sharkawy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RewriteContextprivate ValueStores the current visited value.private boolean -
Constructor Summary
ConstructorsConstructorDescriptionValueCopy(RewriteContext context, Value value) Single constructor of this class. -
Method Summary
Modifier and TypeMethodDescription(package private) ValuegetValue()Returns the filtered and copied value.(package private) booleanReturns whether the original value will be returned or whether at least one value was removed from the original value.voidvisitBooleanValue(BooleanValue value) This method is used for visiting BooleanValue.voidvisitCompoundValue(CompoundValue value) This method is used for visiting CompoundValue.voidThis method is used for visiting ConstraintValue.voidThis method is used for visiting ContainerValue.voidvisitEnumValue(EnumValue value) This method is used for visiting EnumValue.voidvisitIntValue(IntValue value) This method is used for visiting IntValue.voidvisitMetaTypeValue(MetaTypeValue value) This method is used for visiting meta type value.voidvisitNullValue(NullValue value) This method is used for visiting a null value.voidvisitRealValue(RealValue value) This method is used for visiting RealValue.voidvisitReferenceValue(ReferenceValue referenceValue) This method is used for visiting referenceValue.voidvisitStringValue(StringValue value) This method is used for visiting StringValue.voidvisitVersionValue(VersionValue value) This method is used for visiting a version value.
-
Field Details
-
copiedValue
Stores the current visited value. Maybe the same instance or a copied/filtered version. Maybe null if the current value shall be filtered out. -
valuesOmmited
private boolean valuesOmmited -
context
-
-
Constructor Details
-
ValueCopy
ValueCopy(RewriteContext context, Value value) Single constructor of this class.- Parameters:
context- The context, containing information about filtered elements.value- The value to be copied.
-
-
Method Details
-
getValue
Value getValue()Returns the filtered and copied value.- Returns:
- Maybe the same instance if filtering was not needed. Maybe null if complete value was filtered.
-
valuesOmitted
boolean valuesOmitted()Returns whether the original value will be returned or whether at least one value was removed from the original value.- Returns:
trueif at least one value was removed,falseif the original value will be returned.
-
visitConstraintValue
Description copied from interface:IValueVisitorThis method is used for visiting ConstraintValue.- Specified by:
visitConstraintValuein interfaceIValueVisitor- Parameters:
value- One ConstraintValue which should be visited.
-
visitEnumValue
Description copied from interface:IValueVisitorThis method is used for visiting EnumValue.- Specified by:
visitEnumValuein interfaceIValueVisitor- Parameters:
value- One EnumValue which should be visited.
-
visitStringValue
Description copied from interface:IValueVisitorThis method is used for visiting StringValue.- Specified by:
visitStringValuein interfaceIValueVisitor- Parameters:
value- One StringValue which should be visited.
-
visitCompoundValue
Description copied from interface:IValueVisitorThis method is used for visiting CompoundValue.- Specified by:
visitCompoundValuein interfaceIValueVisitor- Parameters:
value- One CompoundValue which should be visited.
-
visitContainerValue
Description copied from interface:IValueVisitorThis method is used for visiting ContainerValue.- Specified by:
visitContainerValuein interfaceIValueVisitor- Parameters:
value- One CompoundValue which should be visited.
-
visitIntValue
Description copied from interface:IValueVisitorThis method is used for visiting IntValue.- Specified by:
visitIntValuein interfaceIValueVisitor- Parameters:
value- One IntValue which should be visited.
-
visitRealValue
Description copied from interface:IValueVisitorThis method is used for visiting RealValue.- Specified by:
visitRealValuein interfaceIValueVisitor- Parameters:
value- One RealValue which should be visited.
-
visitBooleanValue
Description copied from interface:IValueVisitorThis method is used for visiting BooleanValue.- Specified by:
visitBooleanValuein interfaceIValueVisitor- Parameters:
value- One BooleanValue which should be visited.
-
visitReferenceValue
Description copied from interface:IValueVisitorThis method is used for visiting referenceValue.- Specified by:
visitReferenceValuein interfaceIValueVisitor- Parameters:
referenceValue- One referenceValue which should be visited.
-
visitMetaTypeValue
Description copied from interface:IValueVisitorThis method is used for visiting meta type value.- Specified by:
visitMetaTypeValuein interfaceIValueVisitor- Parameters:
value- a value which should be visited.
-
visitNullValue
Description copied from interface:IValueVisitorThis method is used for visiting a null value.- Specified by:
visitNullValuein interfaceIValueVisitor- Parameters:
value- a value which should be visited (actuallyNullValue.INSTANCE).
-
visitVersionValue
Description copied from interface:IValueVisitorThis method is used for visiting a version value.- Specified by:
visitVersionValuein interfaceIValueVisitor- Parameters:
value- a value which should be visited.
-