Class ConstantValueResolver

java.lang.Object
net.ssehub.easy.varModel.cstEvaluation.ConstantValueResolver
All Implemented Interfaces:
IValueVisitor

class ConstantValueResolver extends Object implements IValueVisitor
Implements a constant value resolution visitor. During resolution, individual values may be cloned, in particular if resolution may change individual parts, e.g., from an expression to a constant.
Author:
Holger Eichelberger
  • Field Details

  • Constructor Details

    • ConstantValueResolver

      ConstantValueResolver(EvaluationVisitor evaluator)
      Creates a resolver instance.
      Parameters:
      evaluator - the evaluator used to evaluate nested expression
  • Method Details

    • getValue

      Value getValue()
      Returns the resolved value and clears the internal state.
      Returns:
      the resolved value, may be null if resolution fails
    • visitConstraintValue

      public void visitConstraintValue(ConstraintValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting ConstraintValue.
      Specified by:
      visitConstraintValue in interface IValueVisitor
      Parameters:
      value - One ConstraintValue which should be visited.
    • visitEnumValue

      public void visitEnumValue(EnumValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting EnumValue.
      Specified by:
      visitEnumValue in interface IValueVisitor
      Parameters:
      value - One EnumValue which should be visited.
    • visitStringValue

      public void visitStringValue(StringValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting StringValue.
      Specified by:
      visitStringValue in interface IValueVisitor
      Parameters:
      value - One StringValue which should be visited.
    • visitCompoundValue

      public void visitCompoundValue(CompoundValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting CompoundValue.
      Specified by:
      visitCompoundValue in interface IValueVisitor
      Parameters:
      value - One CompoundValue which should be visited.
    • visitContainerValue

      public void visitContainerValue(ContainerValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting ContainerValue.
      Specified by:
      visitContainerValue in interface IValueVisitor
      Parameters:
      value - One CompoundValue which should be visited.
    • visitIntValue

      public void visitIntValue(IntValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting IntValue.
      Specified by:
      visitIntValue in interface IValueVisitor
      Parameters:
      value - One IntValue which should be visited.
    • visitRealValue

      public void visitRealValue(RealValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting RealValue.
      Specified by:
      visitRealValue in interface IValueVisitor
      Parameters:
      value - One RealValue which should be visited.
    • visitBooleanValue

      public void visitBooleanValue(BooleanValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting BooleanValue.
      Specified by:
      visitBooleanValue in interface IValueVisitor
      Parameters:
      value - One BooleanValue which should be visited.
    • visitReferenceValue

      public void visitReferenceValue(ReferenceValue referenceValue)
      Description copied from interface: IValueVisitor
      This method is used for visiting referenceValue.
      Specified by:
      visitReferenceValue in interface IValueVisitor
      Parameters:
      referenceValue - One referenceValue which should be visited.
    • visitMetaTypeValue

      public void visitMetaTypeValue(MetaTypeValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting meta type value.
      Specified by:
      visitMetaTypeValue in interface IValueVisitor
      Parameters:
      value - a value which should be visited.
    • visitNullValue

      public void visitNullValue(NullValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting a null value.
      Specified by:
      visitNullValue in interface IValueVisitor
      Parameters:
      value - a value which should be visited (actually NullValue.INSTANCE).
    • visitVersionValue

      public void visitVersionValue(VersionValue value)
      Description copied from interface: IValueVisitor
      This method is used for visiting a version value.
      Specified by:
      visitVersionValue in interface IValueVisitor
      Parameters:
      value - a value which should be visited.