Class VelocityCompoundAccess
- java.lang.Object
-
- net.ssehub.easy.instantiation.velocity.VelocityContextItem
-
- net.ssehub.easy.instantiation.velocity.VelocityCompoundAccess
-
public class VelocityCompoundAccess extends VelocityContextItem
Context which allows retrieval of nested values of a compound via getByName(<slot name>).- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.Object>nestedValues
-
Constructor Summary
Constructors Constructor Description VelocityCompoundAccess(java.lang.String variableName, java.lang.Object cmpValue)Sole constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaddValue(java.lang.String nestedName, java.lang.Object value)Adds a nested value of the compound.java.lang.ObjectbyName(java.lang.String slotName)Returns the desired member value of the compound.java.lang.ObjectgetByName(java.lang.String slotName)Returns the desired member value of the compound.java.lang.Objectvalue(java.lang.String slotName)Returns the desired member value of the compound.-
Methods inherited from class net.ssehub.easy.instantiation.velocity.VelocityContextItem
getName, getValue, toString
-
-
-
-
Method Detail
-
addValue
void addValue(java.lang.String nestedName, java.lang.Object value)Adds a nested value of the compound.- Parameters:
nestedName- The slot name of the compound.value- The value, as it shall be accessible via velocity
-
getByName
public java.lang.Object getByName(java.lang.String slotName)
Returns the desired member value of the compound.- Parameters:
slotName- The name of the desired slot.- Returns:
- The value or null if the specified slot does not exist.
-
byName
public java.lang.Object byName(java.lang.String slotName)
Returns the desired member value of the compound.- Parameters:
slotName- The name of the desired slot.- Returns:
- The value or null if the specified slot does not exist.
-
value
public java.lang.Object value(java.lang.String slotName)
Returns the desired member value of the compound.- Parameters:
slotName- The name of the desired slot.- Returns:
- The value or null if the specified slot does not exist.
-
-