org.apache.velocity.context
クラス InternalContextBase

java.lang.Object
  拡張org.apache.velocity.context.InternalContextBase
すべての実装インタフェース:
InternalEventContext, InternalHousekeepingContext, java.io.Serializable
直系の既知のサブクラス:
AbstractContext

class InternalContextBase
extends java.lang.Object
implements InternalHousekeepingContext, InternalEventContext, java.io.Serializable

class to encapsulate the 'stuff' for internal operation of velocity. We use the context as a thread-safe storage : we take advantage of the fact that it's a visitor of sorts to all nodes (that matter) of the AST during init() and render(). Currently, it carries the template name for namespace support, as well as node-local context data introspection caching. Note that this is not a public class. It is for package access only to keep application code from accessing the internals, as AbstractContext is derived from this.

バージョン:
$Id: InternalContextBase.java,v 1.8 2001/05/20 19:44:34 geirm Exp $
作成者:
Geir Magnusson Jr.

フィールドの概要
private  Resource currentResource
          Current resource - used for carrying encoding and other information down into the rendering process
private  EventCartridge eventCartridge
          EventCartridge we are to carry.
private  java.util.HashMap introspectionCache
          cache for node/context specific introspection information
private  java.util.Stack templateNameStack
          Template name stack.
 
コンストラクタの概要
(パッケージプライベート) InternalContextBase()
           
 
メソッドの概要
 EventCartridge attachEventCartridge(EventCartridge ec)
           
 Resource getCurrentResource()
          temporary fix to enable #include() to figure out current encoding.
 java.lang.String getCurrentTemplateName()
          get the current template name
 EventCartridge getEventCartridge()
           
 java.lang.Object[] getTemplateNameStack()
          get the current template name stack
 IntrospectionCacheData icacheGet(java.lang.Object key)
          returns an IntrospectionCache Data (@see IntrospectionCacheData) object if exists for the key
 void icachePut(java.lang.Object key, IntrospectionCacheData o)
          places an IntrospectionCache Data (@see IntrospectionCacheData) element in the cache for specified key
 void popCurrentTemplateName()
          remove the current template name from stack
 void pushCurrentTemplateName(java.lang.String s)
          set the current template name on top of stack
 void setCurrentResource(Resource r)
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

introspectionCache

private java.util.HashMap introspectionCache
cache for node/context specific introspection information


templateNameStack

private java.util.Stack templateNameStack
Template name stack. The stack top contains the current template name.


eventCartridge

private EventCartridge eventCartridge
EventCartridge we are to carry. Set by application


currentResource

private Resource currentResource
Current resource - used for carrying encoding and other information down into the rendering process

コンストラクタの詳細

InternalContextBase

InternalContextBase()
メソッドの詳細

pushCurrentTemplateName

public void pushCurrentTemplateName(java.lang.String s)
set the current template name on top of stack

定義:
インタフェース InternalHousekeepingContext 内の pushCurrentTemplateName
パラメータ:
s - current template name

popCurrentTemplateName

public void popCurrentTemplateName()
remove the current template name from stack

定義:
インタフェース InternalHousekeepingContext 内の popCurrentTemplateName

getCurrentTemplateName

public java.lang.String getCurrentTemplateName()
get the current template name

定義:
インタフェース InternalHousekeepingContext 内の getCurrentTemplateName
戻り値:
String current template name

getTemplateNameStack

public java.lang.Object[] getTemplateNameStack()
get the current template name stack

定義:
インタフェース InternalHousekeepingContext 内の getTemplateNameStack
戻り値:
Object[] with the template name stack contents.

icacheGet

public IntrospectionCacheData icacheGet(java.lang.Object key)
returns an IntrospectionCache Data (@see IntrospectionCacheData) object if exists for the key

定義:
インタフェース InternalHousekeepingContext 内の icacheGet
パラメータ:
key - key to find in cache
戻り値:
cache object

icachePut

public void icachePut(java.lang.Object key,
                      IntrospectionCacheData o)
places an IntrospectionCache Data (@see IntrospectionCacheData) element in the cache for specified key

定義:
インタフェース InternalHousekeepingContext 内の icachePut
パラメータ:
key - key
o - IntrospectionCacheData object to place in cache

setCurrentResource

public void setCurrentResource(Resource r)
定義:
インタフェース InternalHousekeepingContext 内の setCurrentResource

getCurrentResource

public Resource getCurrentResource()
インタフェース InternalHousekeepingContext の記述:
temporary fix to enable #include() to figure out current encoding.

定義:
インタフェース InternalHousekeepingContext 内の getCurrentResource

attachEventCartridge

public EventCartridge attachEventCartridge(EventCartridge ec)
定義:
インタフェース InternalEventContext 内の attachEventCartridge

getEventCartridge

public EventCartridge getEventCartridge()
定義:
インタフェース InternalEventContext 内の getEventCartridge


Copyright © 2003 Apache Software Foundation. All Rights Reserved.