|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.joost.stx.FunctionTable.ExtensionFunction
An instance of this class represents a Java extension function. Parts of this code are taken from Michael Kay's Saxon XSLT processor implementation.
| Field Summary | |
private ArrayList |
candidateMethods
possible methods, should differ at most in formal parameter types |
private boolean |
isConstructor
true if this function call is a constructor invocation |
private int |
paramCount
the number of provided parameters in the function call |
private Class |
targetClass
the target class, identified by the namespace |
| Constructor Summary | |
FunctionTable.ExtensionFunction(String className,
String lName,
Tree args,
Locator locator)
Constructs a Java extension function. |
|
| Method Summary | |
Value |
evaluate(Context context,
int top,
Tree args)
find and call the correct Java method |
int |
getMaxParCount()
Not called |
int |
getMinParCount()
Not called |
String |
getName()
Not called |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Class targetClass
private ArrayList candidateMethods
private int paramCount
private boolean isConstructor
true if this function call is a constructor invocation
| Constructor Detail |
public FunctionTable.ExtensionFunction(String className,
String lName,
Tree args,
Locator locator)
throws SAXParseException
className - the name of the Java class the function belongs to
(taken from the namespace URI of the function call)lName - the local name of the function call
(may contain hyphens)args - the supplied function parameterslocator - the Locator object
SAXParseException - if there's no proper function| Method Detail |
public Value evaluate(Context context,
int top,
Tree args)
throws SAXException,
EvalException
evaluate in interface FunctionTable.Instancecontext - the Context objecttop - the number of the upper most element on the stackargs - the current parameters
Value instance containing the result
EvalException - if an error occurs while processing
SAXException - if an error occurs while processingpublic int getMinParCount()
getMinParCount in interface FunctionTable.Instancepublic int getMaxParCount()
getMaxParCount in interface FunctionTable.Instancepublic String getName()
getName in interface FunctionTable.Instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||