net.sf.saxon.instruct

Class Procedure

public abstract class Procedure extends Object implements Serializable, Container, InstructionInfo, LocationProvider

This object represents the compiled form of a user-written function, template, attribute-set, etc (the source can be either an XSLT stylesheet function or an XQuery function).

It is assumed that type-checking, of both the arguments and the results, has been handled at compile time. That is, the expression supplied as the body of the function must be wrapped in code to check or convert the result to the required type, and calls on the function must be wrapped at compile time to check or convert the supplied arguments.

Field Summary
protected Expressionbody
Constructor Summary
Procedure()
Method Summary
ExpressiongetBody()
intgetColumnNumber()
intgetColumnNumber(long locationId)
intgetContainerGranularity()
Get the granularity of the container.
ExecutablegetExecutable()
intgetHostLanguage()
intgetLineNumber()
intgetLineNumber(long locationId)
LocationProvidergetLocationProvider()
Get the LocationProvider allowing location identifiers to be resolved.
IteratorgetProperties()
Get an iterator over all the properties available.
ObjectgetProperty(String name)
StringgetPublicId()
SlotManagergetStackFrameMap()
StringgetSystemId()
StringgetSystemId(long locationId)
voidsetBody(Expression body)
voidsetExecutable(Executable executable)
voidsetHostLanguage(int language)
voidsetLineNumber(int lineNumber)
voidsetStackFrameMap(SlotManager map)
voidsetSystemId(String systemId)

Field Detail

body

protected Expression body

Constructor Detail

Procedure

public Procedure()

Method Detail

getBody

public final Expression getBody()

getColumnNumber

public int getColumnNumber()

getColumnNumber

public int getColumnNumber(long locationId)

getContainerGranularity

public int getContainerGranularity()
Get the granularity of the container.

Returns: 0 for a temporary container created during parsing; 1 for a container that operates at the level of an XPath expression; 2 for a container at the level of a global function or template

getExecutable

public final Executable getExecutable()

getHostLanguage

public int getHostLanguage()

getLineNumber

public int getLineNumber()

getLineNumber

public int getLineNumber(long locationId)

getLocationProvider

public LocationProvider getLocationProvider()
Get the LocationProvider allowing location identifiers to be resolved.

getProperties

public Iterator getProperties()
Get an iterator over all the properties available. The values returned by the iterator will be of type String, and each string can be supplied as input to the getProperty() method to retrieve the value of the property. The iterator may return properties whose value is null.

getProperty

public Object getProperty(String name)

getPublicId

public String getPublicId()

getStackFrameMap

public SlotManager getStackFrameMap()

getSystemId

public String getSystemId()

getSystemId

public String getSystemId(long locationId)

setBody

public void setBody(Expression body)

setExecutable

public void setExecutable(Executable executable)

setHostLanguage

public void setHostLanguage(int language)

setLineNumber

public void setLineNumber(int lineNumber)

setStackFrameMap

public void setStackFrameMap(SlotManager map)

setSystemId

public void setSystemId(String systemId)