public class ProxyVMContext extends ChainedInternalContextAdapter
innerContext| 构造器和说明 |
|---|
ProxyVMContext(InternalContextAdapter inner,
RuntimeServices rsvc,
boolean localContextScope) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addVMProxyArg(InternalContextAdapter context,
java.lang.String macroArgumentName,
java.lang.String literalMacroArgumentName,
Node argumentValue)
Used to put Velocity macro arguments into this context.
|
void |
addVMProxyArg(InternalContextAdapter context,
java.lang.String macroArgumentName,
java.lang.String literalMacroArgumentName,
Renderable argumentValue)
Used to put Velocity macro bodyContext arguments into this context.
|
boolean |
containsKey(java.lang.Object key)
Indicates whether the specified key is in the context.
|
java.lang.Object |
get(java.lang.String key)
Implementation of the Context.get() method.
|
java.lang.Object[] |
getKeys()
Get all the keys for the values in the context.
|
java.lang.Object |
localPut(java.lang.String key,
java.lang.Object value)
Allows callers to explicitly put objects in the local context, no matter what the
velocimacro.context.local setting says.
|
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Impl of the Context.put() method.
|
protected java.lang.Object |
put(java.lang.String key,
java.lang.Object value,
boolean forceLocal)
Internal put method to select between local and global scope.
|
java.lang.Object |
remove(java.lang.Object key)
Removes the value associated with the specified key from the context.
|
attachEventCartridge, getBaseContext, getCurrentMacroCallDepth, getCurrentMacroName, getCurrentResource, getCurrentTemplateName, getEventCartridge, getInternalUserContext, getMacroLibraries, getMacroNameStack, getTemplateNameStack, icacheGet, icachePut, popCurrentMacroName, popCurrentTemplateName, pushCurrentMacroName, pushCurrentTemplateName, setCurrentResource, setMacroLibrariespublic ProxyVMContext(InternalContextAdapter inner, RuntimeServices rsvc, boolean localContextScope)
inner - Velocity context for processingrsvc - RuntimeServices provides logging referencelocalContextScope - if true, all references are set to be localpublic void addVMProxyArg(InternalContextAdapter context, java.lang.String macroArgumentName, java.lang.String literalMacroArgumentName, Node argumentValue) throws MethodInvocationException
context - rendering contextmacroArgumentName - name of the macro argument that we receivedliteralMacroArgumentName - ".literal.$"+macroArgumentNameargumentValue - actual value of the macro argumentMethodInvocationExceptionpublic void addVMProxyArg(InternalContextAdapter context, java.lang.String macroArgumentName, java.lang.String literalMacroArgumentName, Renderable argumentValue) throws MethodInvocationException
context - rendering contextmacroArgumentName - name of the macro argument that we receivedliteralMacroArgumentName - ".literal.$"+macroArgumentNameargumentValue - actual value of the macro bodyMethodInvocationExceptionpublic java.lang.Object put(java.lang.String key,
java.lang.Object value)
put 在接口中 Contextput 在类中 ChainedInternalContextAdapterkey - name of item to setvalue - object to set to keypublic java.lang.Object localPut(java.lang.String key,
java.lang.Object value)
localPut 在接口中 InternalWrapperContextlocalPut 在类中 ChainedInternalContextAdapterkey - name of item to set.value - object to set to key.InternalWrapperContext.localPut(java.lang.String,java.lang.Object)protected java.lang.Object put(java.lang.String key,
java.lang.Object value,
boolean forceLocal)
key - name of item to setvalue - object to set to keyforceLocal - True forces the object into the local scope.public java.lang.Object get(java.lang.String key)
get 在接口中 Contextget 在类中 ChainedInternalContextAdapterkey - name of item to getpublic boolean containsKey(java.lang.Object key)
ContextcontainsKey 在接口中 ContextcontainsKey 在类中 ChainedInternalContextAdapterkey - The key to look for.Context.containsKey(java.lang.Object)public java.lang.Object[] getKeys()
ContextgetKeys 在接口中 ContextgetKeys 在类中 ChainedInternalContextAdapterContext.getKeys()public java.lang.Object remove(java.lang.Object key)
Contextremove 在接口中 Contextremove 在类中 ChainedInternalContextAdapterkey - The name of the value to remove.null
if unmapped.Context.remove(java.lang.Object)