Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xalan.xpath
Class XSLTJavaClassEngine

    java.lang.Object
      |
      +--com.ibm.bsf.util.BSFEngineImpl
            |
            +--org.apache.xalan.xpath.XSLTJavaClassEngine

public class XSLTJavaClassEngine
extends com.ibm.bsf.util.BSFEngineImpl
implements ExtensionFunctionHandler.ExtensionLiaison

**For internal use only** This is a custom scripting engine for the XSLT processor's needs of calling into Java objects.

Field Summary
`java.lang.Class` | `classObject` **For internal use only**
`java.lang.Object` | `javaObject` **For internal use only**
`java.lang.String` | `scriptLang` **For internal use only**
`java.lang.String` | `scriptSrc` **For internal use only**
`java.lang.String` | `scriptSrcURL` **For internal use only**

Constructor Summary
`XSLTJavaClassEngine()` **For internal use only**

Method Summary
`java.lang.Object` | `call(java.lang.Object object, java.lang.String method, java.lang.Object[] args)` **For internal use only** call the named method on the object that was loaded by eval.
`java.lang.Object` | `callFunction(java.lang.String funcName, java.util.Vector args, java.lang.Object methodKey, java.lang.Class javaClass)` **For internal use only** Process a call to a function.
`java.lang.Object` | `callJava(java.lang.Object object, java.lang.String method, java.lang.Object[] args, java.lang.Object methodKey)` **For internal use only** call the named method on the object that was loaded by eval.
`void` | `checkInit()` **For internal use only**
`java.lang.Object` | `eval(java.lang.String source, int lineNo, int columnNo, java.lang.Object oscript)` **For internal use only** This is used by an application to evaluate an object containing some expression - clearly not possible for compiled code ..
`void` | `setScript(java.lang.String lang, java.lang.String srcURL, java.lang.String scriptSrc)` **For internal use only** Set the script data for this extension NS.
`void` | `startupComponent(java.lang.Class classObj)` **For internal use only** Start the component up by executing any script that needs to run at startup time.

Methods inherited from class com.ibm.bsf.util.BSFEngineImpl
`apply, compileApply, compileExpr, compileScript, declareBean, exec, initialize, propertyChange, setDebug, terminate, undeclareBean`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### scriptLang

    public java.lang.String scriptLang

### scriptSrcURL

    public java.lang.String scriptSrcURL

### scriptSrc

    public java.lang.String scriptSrc

### javaObject

    public java.lang.Object javaObject

### classObject

    public java.lang.Class classObject

Constructor Detail

### XSLTJavaClassEngine

    public XSLTJavaClassEngine()

Method Detail

### eval

    public java.lang.Object eval(java.lang.String source,
                                 int lineNo,
                                 int columnNo,
                                 java.lang.Object oscript)
                          throws com.ibm.bsf.BSFException

  **For internal use only** This is used by an application to evaluate an object containing some expression - clearly not possible for compiled code ..
  Overrides:
    eval in class com.ibm.bsf.util.BSFEngineImpl

### call

    public java.lang.Object call(java.lang.Object object,
                                 java.lang.String method,
                                 java.lang.Object[] args)
                          throws com.ibm.bsf.BSFException

  **For internal use only** call the named method on the object that was loaded by eval. The method selection stuff is very XSLT-specific, hence the custom engine.
  Parameters:
    `object` - ignored - should always be null
  Overrides:
    call in class com.ibm.bsf.util.BSFEngineImpl

### setScript

    public void setScript(java.lang.String lang,
                          java.lang.String srcURL,
                          java.lang.String scriptSrc)

  **For internal use only** Set the script data for this extension NS. If srcURL is !null then the script body is read from that URL. If not the scriptSrc is used as the src. This method does not actually execute anything - that's done when the component is first hit by the user by an element or a function call.
  Specified by:
    setScript in interface ExtensionFunctionHandler.ExtensionLiaison
  Parameters:
    `lang` - language of the script.
    `srcURL` - value of src attribute (if any) - treated as a URL or a classname depending on the value of lang. If srcURL is not null, then scriptSrc is ignored.
    `scriptSrc` - the actual script code (if any)

### callJava

    public java.lang.Object callJava(java.lang.Object object,
                                     java.lang.String method,
                                     java.lang.Object[] args,
                                     java.lang.Object methodKey)
                              throws XPathException

  **For internal use only** call the named method on the object that was loaded by eval. The method selection stuff is very XSLT-specific, hence the custom engine.
  Specified by:
    callJava in interface ExtensionFunctionHandler.ExtensionLiaison
  Parameters:
    `object` - ignored - should always be null

### callFunction

    public java.lang.Object callFunction(java.lang.String funcName,
                                         java.util.Vector args,
                                         java.lang.Object methodKey,
                                         java.lang.Class javaClass)
                                  throws XPathException

  **For internal use only** Process a call to a function.
  Specified by:
    callFunction in interface ExtensionFunctionHandler.ExtensionLiaison
  Parameters:
    `funcName` - Function name.
    `args` - The arguments of the function call.
  Returns:
    the return value of the function evaluation.
  Throws:
    XSLProcessorException - thrown if something goes wrong while running the extension handler.
    MalformedURLException - if loading trouble
    java.io.FileNotFoundException - if loading trouble
    java.io.IOException - if loading trouble
    org.xml.sax.SAXException - if parsing trouble

### checkInit

    public void checkInit()
                   throws XPathProcessorException

  Specified by:
    checkInit in interface ExtensionFunctionHandler.ExtensionLiaison

### startupComponent

    public void startupComponent(java.lang.Class classObj)
                          throws XPathProcessorException

  **For internal use only** Start the component up by executing any script that needs to run at startup time. This needs to happen before any functions can be called on the component.
  Specified by:
    startupComponent in interface ExtensionFunctionHandler.ExtensionLiaison
  Throws:
    XPathProcessorException - if something bad happens.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache XML Project. All Rights Reserved.