Class VelocityContextItem
java.lang.Object
net.ssehub.easy.instantiation.velocity.VelocityContextItem
- Direct Known Subclasses:
VelocityCompoundAccess,VelocityContainerItem
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVelocityContextItem(String variableName, Object value) Sole constructor for this class. -
Method Summary
Modifier and TypeMethodDescription(package private) StringgetName()Returns the name of the variable as it is used inside the code fragments.(package private) ObjectgetValue()Returns the value which shall replace the name inside the code fragments.final StringtoString()ReturnsgetValue()as String.
-
Field Details
-
variableName
-
value
-
-
Constructor Details
-
VelocityContextItem
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
ReturnsgetValue()as String. This facilitates the direct usage of the variable inside the code to insert its value as expected by an pre-processor.
-