com.gargoylesoftware.htmlunit.html.xpath
Class FunctionContextWrapper

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.html.xpath.FunctionContextWrapper
All Implemented Interfaces:
org.jaxen.FunctionContext

public class FunctionContextWrapper
extends java.lang.Object
implements org.jaxen.FunctionContext

A wrapper allowing to add new functions without affecting the original context.

Version:
$Revision: 1.3 $
Author:
Marc Guillemot

Constructor Summary
FunctionContextWrapper(org.jaxen.FunctionContext functionContext)
 Wraps an existing context
 
Method Summary
 org.jaxen.Function getFunction(java.lang.String namespaceURI, java.lang.String prefix, java.lang.String localName)
 First look at the locally defined function and if none found calls the wrapped context.
 void registerFunction(java.lang.String localName, org.jaxen.Function function)
 Registers a function for this context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionContextWrapper

public FunctionContextWrapper(org.jaxen.FunctionContext functionContext)
Wraps an existing context

Parameters:
functionContext - the context to wrap
Method Detail

getFunction

public org.jaxen.Function getFunction(java.lang.String namespaceURI,
                                      java.lang.String prefix,
                                      java.lang.String localName)
                               throws org.jaxen.UnresolvableException
First look at the locally defined function and if none found calls the wrapped context.

Specified by:
getFunction in interface org.jaxen.FunctionContext
Throws:
org.jaxen.UnresolvableException

registerFunction

public void registerFunction(java.lang.String localName,
                             org.jaxen.Function function)
Registers a function for this context.

Parameters:
localName - The non-prefixed local portion of the function to be registered with this context.
function - the object to be used when evaluating the function.


Copyright © 2003-2009 AppPerfect Corporation. All Rights Reserved.