Interface IRestrictionEvaluationContext
-
- All Known Implementing Classes:
LocalConfiguration,RuntimeEnvironment,RuntimeEnvironment,RuntimeEnvironment
public interface IRestrictionEvaluationContextDefines the evaluation context for version restrictions. Beforesettingvalues for variables,startEvaluation()shall be called byIVersionRestriction.evaluate(IRestrictionEvaluationContext, Version).unsetValue(IVariable)shall be called before ending the evaluation to clean up the variable binding. FinallyIVersionRestriction.evaluate(IRestrictionEvaluationContext, Version)shall callendEvaluation(Object).- Author:
- Holger Eichelberger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidendEvaluation(java.lang.Object processor)Notifies the context about the end of the evaluation.voidsetValue(IVariable variable, Version version)Defines the value for the given variable in this context.java.lang.ObjectstartEvaluation()Notifies the context about starting the evaluation.voidunsetValue(IVariable variable)Unsets the value for the given variable.
-
-
-
Method Detail
-
setValue
void setValue(IVariable variable, Version version) throws RestrictionEvaluationException
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
void unsetValue(IVariable variable) throws RestrictionEvaluationException
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
java.lang.Object startEvaluation() throws RestrictionEvaluationExceptionNotifies the context about starting the evaluation.- Returns:
- returns the evaluation processor
- Throws:
RestrictionEvaluationException- in case that a sub context cannot be created
-
endEvaluation
void endEvaluation(java.lang.Object processor) throws RestrictionEvaluationExceptionNotifies 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
-
-