Class VelocityContextInitializer

java.lang.Object
net.ssehub.easy.instantiation.velocity.VelocityContextInitializer
All Implemented Interfaces:
net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor

class VelocityContextInitializer extends Object implements net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
Converts an IDecisionVariable into flat VelocityContextItem, because Velocity needs a simple (name, value) tuple for instantiation.
Author:
Sascha El-Sharkawy
  • Field Details

  • Constructor Details

    • VelocityContextInitializer

      VelocityContextInitializer(net.ssehub.easy.varModel.confModel.IDecisionVariable variable)
      Sole constructor, will immediately start the conversation.
      Parameters:
      variable - A frozen IDecisionVariable of the configuration which shall be used inside the instantiation process.
  • Method Details

    • getItems

      The converted VelocityContextItems. Structured variables like compounds oder container will be converted into multiple items, one item for each nested element.
      Returns:
      The converted items of the IDecisionVariable passed to the constructor.
    • visitDatatype

      public void visitDatatype(net.ssehub.easy.varModel.model.datatypes.IDatatype datatype)
      Specified by:
      visitDatatype in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitAnyType

      public void visitAnyType(net.ssehub.easy.varModel.model.datatypes.AnyType datatype)
      Specified by:
      visitAnyType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitMetaType

      public void visitMetaType(net.ssehub.easy.varModel.model.datatypes.MetaType datatype)
      Specified by:
      visitMetaType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitConstraintType

      public void visitConstraintType(net.ssehub.easy.varModel.model.datatypes.ConstraintType datatype)
      Specified by:
      visitConstraintType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitDerivedType

      public void visitDerivedType(net.ssehub.easy.varModel.model.datatypes.DerivedDatatype datatype)
      Specified by:
      visitDerivedType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • handleContainer

      private void handleContainer()
      Shall convert ContainerVariable into VelocityContextItems, but not implemented yet.
      See Also:
    • visitSet

      public void visitSet(net.ssehub.easy.varModel.model.datatypes.Set set)
      Specified by:
      visitSet in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitSequence

      public void visitSequence(net.ssehub.easy.varModel.model.datatypes.Sequence sequence)
      Specified by:
      visitSequence in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitReference

      public void visitReference(net.ssehub.easy.varModel.model.datatypes.Reference reference)
      Specified by:
      visitReference in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitBooleanType

      public void visitBooleanType(net.ssehub.easy.varModel.model.datatypes.BooleanType type)
      Specified by:
      visitBooleanType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitStringType

      public void visitStringType(net.ssehub.easy.varModel.model.datatypes.StringType type)
      Specified by:
      visitStringType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitIntegerType

      public void visitIntegerType(net.ssehub.easy.varModel.model.datatypes.IntegerType type)
      Specified by:
      visitIntegerType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitRealType

      public void visitRealType(net.ssehub.easy.varModel.model.datatypes.RealType type)
      Specified by:
      visitRealType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitCompoundType

      public void visitCompoundType(net.ssehub.easy.varModel.model.datatypes.Compound compound)
      Specified by:
      visitCompoundType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitEnumType

      public void visitEnumType(net.ssehub.easy.varModel.model.datatypes.Enum enumType)
      Specified by:
      visitEnumType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitOrderedEnumType

      public void visitOrderedEnumType(net.ssehub.easy.varModel.model.datatypes.OrderedEnum enumType)
      Specified by:
      visitOrderedEnumType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitVersionType

      public void visitVersionType(net.ssehub.easy.varModel.model.datatypes.VersionType type)
      Specified by:
      visitVersionType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor