net.sf.saxon.instruct
Class InstructionDetails

java.lang.Object
  extended bynet.sf.saxon.instruct.InstructionDetails
All Implemented Interfaces:
InstructionInfo, SourceLocator

public final class InstructionDetails
extends Object
implements SourceLocator, InstructionInfo

Details about an instruction, used when reporting errors and when tracing


Constructor Summary
InstructionDetails()
           
 
Method Summary
 int getColumnNumber()
          Get the column number identifying the position of the instruction.
 String getInstructionName()
          Get the name of the instruction
 int getLineNumber()
          Get the line number of the instruction within its module
 HashMap getProperties()
          Get all the properties of the instruction
 Object getProperty(String name)
          Get a named property of the instruction
 String getPublicId()
          Get the public ID of the module containing the instruction.
 String getSystemId()
          Get the URI of the module containing the instruction
 void setInstructionName(String instructionName)
          Set the name of the instruction
 void setLineNumber(int lineNumber)
          Set the line number of the instruction within the module
 void setProperty(String name, Object value)
          Set a named property of the instruction
 void setSystemId(String systemId)
          Set the URI of the module containing the instruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstructionDetails

public InstructionDetails()
Method Detail

setSystemId

public void setSystemId(String systemId)
Set the URI of the module containing the instruction

Parameters:
systemId - the module's URI

getSystemId

public String getSystemId()
Get the URI of the module containing the instruction

Specified by:
getSystemId in interface SourceLocator
Returns:
the module's URI

setLineNumber

public void setLineNumber(int lineNumber)
Set the line number of the instruction within the module

Parameters:
lineNumber - the line number

getLineNumber

public int getLineNumber()
Get the line number of the instruction within its module

Specified by:
getLineNumber in interface SourceLocator
Returns:
the line number

setInstructionName

public void setInstructionName(String instructionName)
Set the name of the instruction

Parameters:
instructionName - the name of the instruction. This is a conventional name, it has the form of a QName but the prefix chosen is arbitrary

getInstructionName

public String getInstructionName()
Get the name of the instruction

Specified by:
getInstructionName in interface InstructionInfo
Returns:
the name of the instruction. This is a conventional name, it has the form of a QName but the prefix chosen is arbitrary

setProperty

public void setProperty(String name,
                        Object value)
Set a named property of the instruction


getProperty

public Object getProperty(String name)
Get a named property of the instruction

Specified by:
getProperty in interface InstructionInfo
Parameters:
name - The name of the required property
Returns:
The value of the requested property, or null if the property is not available

getPublicId

public String getPublicId()
Get the public ID of the module containing the instruction. This method is provided to satisfy the SourceLocator interface. However, the public ID is not maintained by Saxon, and the method always returns null

Specified by:
getPublicId in interface SourceLocator
Returns:
null

getColumnNumber

public int getColumnNumber()
Get the column number identifying the position of the instruction. This method is provided to satisfy the SourceLocator interface. However, the column number is not maintained by Saxon, and the method always returns -1

Specified by:
getColumnNumber in interface SourceLocator
Returns:
-1

getProperties

public HashMap getProperties()
Get all the properties of the instruction

Specified by:
getProperties in interface InstructionInfo
Returns:
a HashMap containing all the properties of this instruction.