Class Resolver.OtherConstraintsProcessor
java.lang.Object
net.ssehub.easy.reasoning.sseReasoner.functions.AbstractConstraintProcessor
net.ssehub.easy.reasoning.sseReasoner.Resolver.OtherConstraintsProcessor
- Enclosing class:
Resolver
Implements a processor for constraints, for which variables (including the variable mapping) shall be substituted
and the result shall be added to
Resolver.otherConstraints. Call
setParameter(ConstraintSyntaxTree, AbstractVariable, IDecisionVariable) before
processing and clear() afterwards before reuse.- Author:
- Holger Eichelberger
-
Nested Class Summary
Nested classes/interfaces inherited from class net.ssehub.easy.reasoning.sseReasoner.functions.AbstractConstraintProcessor
AbstractConstraintProcessor.ExpressionType -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidclear()Clears the parameters for reuse.Returns the context stack, e.g., for type exclusions.net.ssehub.easy.varModel.cst.ConstraintSyntaxTreeprocess(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree cst, AbstractConstraintProcessor.ExpressionType type, String slot, net.ssehub.easy.varModel.model.IModelElement parent) Processes a constraint syntax tree.private voidsetParameter(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree selfEx, net.ssehub.easy.varModel.model.AbstractVariable self, net.ssehub.easy.varModel.confModel.IDecisionVariable variable) Sets the parameters for processing.Methods inherited from class net.ssehub.easy.reasoning.sseReasoner.functions.AbstractConstraintProcessor
process
-
Field Details
-
selfEx
private net.ssehub.easy.varModel.cst.ConstraintSyntaxTree selfEx -
self
private net.ssehub.easy.varModel.model.AbstractVariable self -
variable
private net.ssehub.easy.varModel.confModel.IDecisionVariable variable
-
-
Constructor Details
-
OtherConstraintsProcessor
private OtherConstraintsProcessor()
-
-
Method Details
-
setParameter
private void setParameter(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree selfEx, net.ssehub.easy.varModel.model.AbstractVariable self, net.ssehub.easy.varModel.confModel.IDecisionVariable variable) Sets the parameters for processing.- Parameters:
selfEx- an expression representing self (ignored if null,selfandselfExshall never both be specified/not null).self- an variable declaration representing self (ignored if null).variable- the variable the constraints are processed for (may be null)
-
clear
private void clear()Clears the parameters for reuse. Although clearing may be superfluous, it also helps getting rid of unnecessary references / supports garbage collection. -
process
public net.ssehub.easy.varModel.cst.ConstraintSyntaxTree process(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree cst, AbstractConstraintProcessor.ExpressionType type, String slot, net.ssehub.easy.varModel.model.IModelElement parent) Description copied from class:AbstractConstraintProcessorProcesses a constraint syntax tree.- Specified by:
processin classAbstractConstraintProcessor- Parameters:
cst- the constraint syntax treetype- the type ofcstslot- the slot name, only in case ofAbstractConstraintProcessor.ExpressionType.DEFAULTorAbstractConstraintProcessor.ExpressionType.ANNOTATION_DEFAULTparent- the actual/intended parent if not determined otherwise- Returns:
- the processed constraint syntax tree, may be
cst
-
getContextStack
Description copied from class:AbstractConstraintProcessorReturns the context stack, e.g., for type exclusions.- Specified by:
getContextStackin classAbstractConstraintProcessor- Returns:
- the context stack
-