Class VelocityContextItem

java.lang.Object
net.ssehub.easy.instantiation.velocity.VelocityContextItem
Direct Known Subclasses:
VelocityCompoundAccess, VelocityContainerItem

public class VelocityContextItem extends Object
Datatype for initializing velocity's context. Stored the name and the related value of configured elements. Compounds will be flattened (using VelocityContextInitializer.SLOT_ACCESS).
Author:
Sascha El-Sharkawy
  • Field Details

    • variableName

      private String variableName
    • value

      private Object value
  • Constructor Details

    • VelocityContextItem

      public VelocityContextItem(String variableName, Object value)
      Sole constructor for this class.
      Parameters:
      variableName - The name of a variable as it is used inside the code fragments.
      value - The value which shall replace the name.
  • Method Details

    • getName

      String getName()
      Returns the name of the variable as it is used inside the code fragments.
      Returns:
      The name of the variable as it is used inside the code fragments.
    • getValue

      Object getValue()
      Returns the value which shall replace the name inside the code fragments.
      Returns:
      The value which shall replace the name inside the code fragments
    • toString

      public final String toString()
      Returns getValue() as String. This facilitates the direct usage of the variable inside the code to insert its value as expected by an pre-processor.
      Overrides:
      toString in class Object