Interface IRestrictionEvaluationContext
public interface IRestrictionEvaluationContext
Defines the evaluation context for version restrictions. Before
setting
values for variables, startEvaluation() shall be called
by IVersionRestriction.evaluate(IRestrictionEvaluationContext, Version). unsetValue(IVariable) shall
be called before ending the evaluation to clean up the variable binding. Finally
IVersionRestriction.evaluate(IRestrictionEvaluationContext, Version) shall call
endEvaluation(Object).- Author:
- Holger Eichelberger
-
Method Summary
Modifier and TypeMethodDescriptionvoidendEvaluation(Object processor) Notifies the context about the end of the evaluation.voidDefines the value for the given variable in this context.Notifies the context about starting the evaluation.voidunsetValue(IVariable variable) Unsets the value for the given variable.
-
Method Details
-
setValue
Defines the value for the given variable in this context. May imply that the given variable is added to the context if adequate.- Parameters:
variable- the variable to be definedversion- the actual value- Throws:
RestrictionEvaluationException- in case that setting the variable fails, e.g., due to type conflicts
-
unsetValue
Unsets the value for the given variable. May imply that the variable is removed from the context if adequate.- Parameters:
variable- the variable to be unset- Throws:
RestrictionEvaluationException- in case that setting the variable fails, e.g., due to type conflicts
-
startEvaluation
Notifies the context about starting the evaluation.- Returns:
- returns the evaluation processor
- Throws:
RestrictionEvaluationException- in case that a sub context cannot be created
-
endEvaluation
Notifies the context about the end of the evaluation.- Parameters:
processor- the evaluation processor for release- Throws:
RestrictionEvaluationException- in case that a sub context cannot be removed
-