public abstract class ComponentBody extends Object implements Container, InstructionInfo
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.
Modifier and Type | Field and Description |
---|---|
protected Expression |
body |
Constructor and Description |
---|
ComponentBody() |
Modifier and Type | Method and Description |
---|---|
void |
allocateAllBindingSlots(StylesheetPackage pack)
Allocate slot numbers to all the external component references in this procedure
|
protected static void |
allocateBindingSlotsRecursive(StylesheetPackage pack,
ComponentBody p,
Expression exp) |
Expression |
getBody() |
int |
getColumnNumber() |
abstract int |
getComponentKind()
Get the kind of component that this represents, using integer constants such as
StandardNames.XSL_FUNCTION |
Configuration |
getConfiguration()
Get the Configuration to which this Container belongs
|
int |
getContainerGranularity()
Get the granularity of the container.
|
Component |
getDeclaringComponent() |
int |
getHostLanguage()
Get the host language (XSLT, XQuery, XPath) used to implement the code in this container
|
int |
getLineNumber()
Get the line number of the instruction in the source stylesheet module.
|
LocationProvider |
getLocationProvider()
Get the LocationProvider allowing location identifiers to be resolved.
|
PackageData |
getPackageData()
Get basic data about the unit of compilation (XQuery module, XSLT package) to which this
container belongs
|
Iterator<String> |
getProperties()
Get an iterator over all the properties available.
|
Object |
getProperty(String name)
Get the value of a particular property of the instruction.
|
String |
getPublicId() |
SlotManager |
getStackFrameMap() |
String |
getSystemId()
Get the system identifier (URI) of the source stylesheet or query module containing
the instruction.
|
void |
makeDeclaringComponent(Visibility visibility,
StylesheetPackage declaringPackage) |
void |
setBody(Expression body) |
void |
setHostLanguage(int language) |
void |
setLineNumber(int lineNumber) |
void |
setPackageData(PackageData packageData)
Set basic data about the unit of compilation (XQuery module, XSLT package) to which this
procedure belongs
|
void |
setStackFrameMap(SlotManager map) |
void |
setSystemId(String systemId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConstructType, getObjectName
protected Expression body
public void setPackageData(PackageData packageData)
packageData
- information about the containing packagepublic PackageData getPackageData()
getPackageData
in interface Container
public int getContainerGranularity()
getContainerGranularity
in interface Container
public void makeDeclaringComponent(Visibility visibility, StylesheetPackage declaringPackage)
public Component getDeclaringComponent()
public void allocateAllBindingSlots(StylesheetPackage pack)
pack
- the containing packageprotected static void allocateBindingSlotsRecursive(StylesheetPackage pack, ComponentBody p, Expression exp)
public Configuration getConfiguration()
getConfiguration
in interface Container
public void setBody(Expression body)
public void setHostLanguage(int language)
public int getHostLanguage()
Container
getHostLanguage
in interface Container
Configuration.XSLT
or Configuration.XQUERY
public final Expression getBody()
public void setStackFrameMap(SlotManager map)
public SlotManager getStackFrameMap()
public LocationProvider getLocationProvider()
public void setLineNumber(int lineNumber)
public void setSystemId(String systemId)
public int getLineNumber()
InstructionInfo
getLineNumber
in interface SourceLocator
getLineNumber
in interface InstructionInfo
public String getSystemId()
InstructionInfo
getSystemId
in interface SourceLocator
getSystemId
in interface InstructionInfo
public int getColumnNumber()
getColumnNumber
in interface SourceLocator
public String getPublicId()
getPublicId
in interface SourceLocator
public Object getProperty(String name)
InstructionInfo
getProperty
in interface InstructionInfo
name
- The name of the required propertypublic Iterator<String> getProperties()
getProperties
in interface InstructionInfo
public abstract int getComponentKind()
StandardNames.XSL_FUNCTION
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.