org.apache.xalan.extensions
Class ExtensionHandlerJava

java.lang.Object
  extended byorg.apache.xalan.extensions.ExtensionHandler
      extended byorg.apache.xalan.extensions.ExtensionHandlerJava
Direct Known Subclasses:
ExtensionHandlerJavaClass, ExtensionHandlerJavaPackage

public abstract class ExtensionHandlerJava
extends ExtensionHandler

Abstract base class handling the java language extensions for XPath. This base class provides cache management shared by all of the various java extension handlers.


Field Summary
private  Hashtable m_cachedMethods
          Table of cached methods
protected  String m_className
          Extension class name
 
Fields inherited from class org.apache.xalan.extensions.ExtensionHandler
m_namespaceUri, m_scriptLang
 
Constructor Summary
protected ExtensionHandlerJava(String namespaceUri, String scriptLang, String className)
          Construct a new extension handler given all the information needed.
 
Method Summary
 Object getFromCache(Object methodKey, Object objType, Object[] methodArgs)
          Look up the entry in the method cache.
 Object putToCache(Object methodKey, Object objType, Object[] methodArgs, Object methodObj)
          Add a new entry into the method cache.
 
Methods inherited from class org.apache.xalan.extensions.ExtensionHandler
callFunction, getClassForName, isElementAvailable, isFunctionAvailable, processElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_className

protected String m_className
Extension class name


m_cachedMethods

private Hashtable m_cachedMethods
Table of cached methods

Constructor Detail

ExtensionHandlerJava

protected ExtensionHandlerJava(String namespaceUri,
                               String scriptLang,
                               String className)
Construct a new extension handler given all the information needed.

Parameters:
namespaceUri - the extension namespace URI that I'm implementing
scriptLang - the scripting language
className - the extension class name
Method Detail

getFromCache

public Object getFromCache(Object methodKey,
                           Object objType,
                           Object[] methodArgs)
Look up the entry in the method cache.

Parameters:
methodKey - A key that uniquely identifies this invocation in the stylesheet.
objType - A Class object or instance object representing the type
methodArgs - An array of the XObject arguments to be used for function mangling.
Returns:
The given method from the method cache

putToCache

public Object putToCache(Object methodKey,
                         Object objType,
                         Object[] methodArgs,
                         Object methodObj)
Add a new entry into the method cache.

Parameters:
methodKey - A key that uniquely identifies this invocation in the stylesheet.
objType - A Class object or instance object representing the type
methodArgs - An array of the XObject arguments to be used for function mangling.
methodObj - A Class object or instance object representing the method
Returns:
The cached method object