Class VelocityContextItem
- java.lang.Object
-
- net.ssehub.easy.instantiation.velocity.VelocityContextItem
-
- Direct Known Subclasses:
VelocityCompoundAccess,VelocityContainerItem
public class VelocityContextItem extends java.lang.ObjectDatatype for initializing velocity's context. Stored the name and the related value of configured elements. Compounds will be flattened (usingVelocityContextInitializer.SLOT_ACCESS).- Author:
- Sascha El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Objectvalueprivate java.lang.StringvariableName
-
Constructor Summary
Constructors Constructor Description VelocityContextItem(java.lang.String variableName, java.lang.Object value)Sole constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.StringgetName()Returns the name of the variable as it is used inside the code fragments.(package private) java.lang.ObjectgetValue()Returns the value which shall replace the name inside the code fragments.java.lang.StringtoString()ReturnsgetValue()as String.
-
-
-
Method Detail
-
getName
java.lang.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
java.lang.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 java.lang.String 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.- Overrides:
toStringin classjava.lang.Object
-
-