Class Resolver.OtherConstraintsProcessor
- java.lang.Object
-
- net.ssehub.easy.reasoning.sseReasoner.functions.AbstractConstraintProcessor
-
- net.ssehub.easy.reasoning.sseReasoner.Resolver.OtherConstraintsProcessor
-
- Enclosing class:
- Resolver
private class Resolver.OtherConstraintsProcessor extends AbstractConstraintProcessor
Implements a processor for constraints, for which variables (including the variable mapping) shall be substituted and the result shall be added toResolver.otherConstraints. Call#setParameter(CompoundAccess, AbstractVariable)before processing andclear()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 Modifier and Type Field Description private AbstractVariableselfprivate ConstraintSyntaxTreeselfExprivate IDecisionVariablevariable
-
Constructor Summary
Constructors Modifier Constructor Description privateOtherConstraintsProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidclear()Clears the parameters for reuse.ContextStackgetContextStack()Returns the context stack, e.g., for type exclusions.ConstraintSyntaxTreeprocess(ConstraintSyntaxTree cst, AbstractConstraintProcessor.ExpressionType type, java.lang.String slot, IModelElement parent)Processes a constraint syntax tree.private voidsetParameter(ConstraintSyntaxTree selfEx, AbstractVariable self, IDecisionVariable variable)Sets the parameters for processing.-
Methods inherited from class net.ssehub.easy.reasoning.sseReasoner.functions.AbstractConstraintProcessor
process
-
-
-
-
Field Detail
-
selfEx
private ConstraintSyntaxTree selfEx
-
self
private AbstractVariable self
-
variable
private IDecisionVariable variable
-
-
Method Detail
-
setParameter
private void setParameter(ConstraintSyntaxTree selfEx, AbstractVariable self, 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 ConstraintSyntaxTree process(ConstraintSyntaxTree cst, AbstractConstraintProcessor.ExpressionType type, java.lang.String slot, 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
public ContextStack getContextStack()
Description copied from class:AbstractConstraintProcessorReturns the context stack, e.g., for type exclusions.- Specified by:
getContextStackin classAbstractConstraintProcessor- Returns:
- the context stack
-
-