public final class ChainedVelocityContext
extends org.apache.velocity.VelocityContext
AbstractContext
because it has broken implementations of containsKey() and getKeys() in Velocity 1.5.
This class works around the broken implementations of containsKey() by checking the result of get() instead.
Constructor and Description |
---|
ChainedVelocityContext(org.apache.velocity.context.Context delegate)
Creates a new chained context using the provided delegate context for secondary lookups.
|
Modifier and Type | Method and Description |
---|---|
boolean |
internalContainsKey(Object key) |
Object |
internalGet(String key) |
Object[] |
internalGetKeys()
This method is inherently unreliable because the implementation of AbstractContext.getKeys() used in
other Velocity contexts doesn't delegate correctly.
|
public ChainedVelocityContext(org.apache.velocity.context.Context delegate)
delegate
- the delegate context which is checked after this contextIllegalArgumentException
- if delegate is nullpublic Object internalGet(String key)
internalGet
in class org.apache.velocity.VelocityContext
public boolean internalContainsKey(Object key)
internalContainsKey
in class org.apache.velocity.VelocityContext
public Object[] internalGetKeys()
internalGetKeys
in class org.apache.velocity.VelocityContext
Copyright © 2003–2017 Atlassian. All rights reserved.