public final class VelocityUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
getObject(Object value,
Object defaultValue)
Returns the "value" parameter if it is not null, otherwise returns
"defaultValue".
|
static Map<String,Object> |
getParameters(org.apache.velocity.context.InternalContextAdapter context,
org.apache.velocity.runtime.parser.node.Node node)
Extracts the parameters from the directives, by getting the child at
position 0 supposing it is a map.
|
public static Map<String,Object> getParameters(org.apache.velocity.context.InternalContextAdapter context, org.apache.velocity.runtime.parser.node.Node node)
context
- The Velocity context.node
- The node to use.public static Object getObject(Object value, Object defaultValue)
value
- The value to return, if it is not null.defaultValue
- The value to return, if value
is null.Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.