|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xml.xpath.Function com.novell.xsl.extensions.ECMAScriptFunction
This class represents a java class member with a particular name. This class is only used during the parsing stage. The getInstance() member returns the actual JavaMethodInstance object that is used by the FunctionCall object. It is abstract to add a level of separation from the underlying Rhino engine in case it isn't there so we can check for the existence and not throw ClassNotFound exceptions
Field Summary | |
protected static Class |
defaultParameterType
|
protected static Class |
defaultReturnType
|
static String |
ECMASCRIPT_EXTENSION_FUNCTION_NAMESPACE
The start of the URI used to signify extension functions and non-built in extension elements: "http://www.novell.com/nxsl/ecmascript" |
static String |
ECMASCRIPT_SCOPE_PROPERTY
The name of the property in the ExpressionContext that holds the ECMAScript execution environment |
protected static Class[] |
optArgs
|
protected static AttrDef[] |
scriptAttr
|
Constructor Summary | |
protected |
ECMAScriptFunction(FunctionSignature signature)
Construct a placeholder for the function library for the desired java class member(s). |
Method Summary | |
boolean |
available(ExpressionContext eContext)
Checks whether or not the function that this object represents actual has an implementation This gets overridden by ECMAScriptFunctionImpl when Rhino is available. |
static ECMAScriptFunction |
create(ExpandedQName name,
ClassLoader classLoader)
factory method |
static Object |
evaluateCommandLineScripts(List scripts,
ClassLoader classLoader)
Evaluate scripts passed in on the command line |
ExpressionValue |
invoke(Object[] args)
Invoke the function using the passed list of arguments. |
static boolean |
isECMAScriptAvailable()
find out if ECMAScript interpreter is available |
static void |
parse(StylesheetParser stylesheetParser,
Element element,
URL baseURI,
ClassLoader classLoader)
Parses the specified ecmascript:script element and returns the
result as a ECMAScriptParser object. |
Methods inherited from class com.novell.xml.xpath.Function |
getInstance, getSignature, isConstant, registerForReset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ECMASCRIPT_EXTENSION_FUNCTION_NAMESPACE
"http://www.novell.com/nxsl/ecmascript"
public static final String ECMASCRIPT_SCOPE_PROPERTY
protected static final Class defaultParameterType
protected static final Class defaultReturnType
protected static final Class[] optArgs
protected static final AttrDef[] scriptAttr
Constructor Detail |
protected ECMAScriptFunction(FunctionSignature signature)
signature
- The function signatureMethod Detail |
public static ECMAScriptFunction create(ExpandedQName name, ClassLoader classLoader)
name
- name of the functionclassLoader
- class loader to use (null for default)
public ExpressionValue invoke(Object[] args) throws XPathEvaluationException
invoke
in class Function
args
- List of arguments.
XPathEvaluationException
public boolean available(ExpressionContext eContext)
eContext
- the ExpressionContext to get the scope from or put the new scope into
public static void parse(StylesheetParser stylesheetParser, Element element, URL baseURI, ClassLoader classLoader) throws XSLTParserException
ecmascript:script
element and returns the
result as a ECMAScriptParser
object.
stylesheetParser
- The StylesheetParser
for which the element is to be parsed.element
- the element to be parsedclassLoader
- class loader to use (null for default)
XSLTParserException
- if a fatal error occurs during parsingpublic static Object evaluateCommandLineScripts(List scripts, ClassLoader classLoader) throws XSLException, IOException
scripts
- a list of Strings containing URI of scripts to evaluateclassLoader
- class loader to use (null for default)
XSLException
IOException
public static boolean isECMAScriptAvailable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |