Class AttachedConstraint
- java.lang.Object
-
- net.ssehub.easy.varModel.model.ModelElement
-
- net.ssehub.easy.varModel.model.ContainableModelElement
-
- net.ssehub.easy.varModel.model.Constraint
-
- net.ssehub.easy.reasoning.core.reasoner.AttachedConstraint
-
- All Implemented Interfaces:
IDatatypeVisitable,IModelElement,IPartialEvaluable
public class AttachedConstraint extends Constraint
Implements a constraint with attached object (fixed andConstraint.Type.USUALtype).- Author:
- Holger Eichelberger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.ssehub.easy.varModel.model.Constraint
Constraint.IConstraintType, Constraint.Type
-
-
Constructor Summary
Constructors Constructor Description AttachedConstraint(ConstraintSyntaxTree consSyntax, IDatatype type, IModelElement parent)Creates a new constraint from an already parsed syntax tree.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintcreateConstraint(ConstraintSyntaxTree consSyntax)Creates a new constraint with same properties but changed constraint syntax tree.java.lang.ObjectgetAttachedTo()Returns the element, e.g., type, the constraint is attached to.-
Methods inherited from class net.ssehub.easy.varModel.model.Constraint
accept, getConsSyntax, getType, isBooleanConstraint, setConsSyntax, toString
-
Methods inherited from class net.ssehub.easy.varModel.model.ContainableModelElement
accept, getNameSpace, getParent, getProject, getQualifiedName, getTopLevelParent, isTopLevel, setParent
-
Methods inherited from class net.ssehub.easy.varModel.model.ModelElement
findAttribute, getComment, getName, getUniqueName, isTransparent, propagateAttribute, setComment, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.ssehub.easy.varModel.model.IPartialEvaluable
getParent
-
-
-
-
Field Detail
-
type
private IDatatype type
-
-
Constructor Detail
-
AttachedConstraint
public AttachedConstraint(ConstraintSyntaxTree consSyntax, IDatatype type, IModelElement parent) throws CSTSemanticException
Creates a new constraint from an already parsed syntax tree.- Parameters:
consSyntax- the constraint syntax treetype- the type this constraint is attached toparent- the object, in which this specific one is embedded- Throws:
CSTSemanticException- in case that the constraint semantics cannot be resolved or that the specified constraint does not evaluate to a boolean expression
-
-
Method Detail
-
getAttachedTo
public java.lang.Object getAttachedTo()
Description copied from class:ConstraintReturns the element, e.g., type, the constraint is attached to. Reasoner may return specialized values here.- Overrides:
getAttachedToin classConstraint- Returns:
- the attached object (null always)
-
createConstraint
public Constraint createConstraint(ConstraintSyntaxTree consSyntax) throws CSTSemanticException
Description copied from class:ConstraintCreates a new constraint with same properties but changed constraint syntax tree.- Overrides:
createConstraintin classConstraint- Parameters:
consSyntax- the syntax tree- Returns:
- the new constraint
- Throws:
CSTSemanticException- in case that the constraint semantics cannot be resolved or that the specified constraint does not evaluate to a boolean expression
-
-