net.sf.saxon.expr
public class RoleLocator extends Object implements Serializable
Field Summary | |
---|---|
static int | BINARY_EXPR |
static int | FUNCTION |
static int | FUNCTION_RESULT |
static int | INSTRUCTION |
static int | ORDER_BY |
static int | TEMPLATE_RESULT |
static int | TYPE_OP |
static int | VARIABLE |
Constructor Summary | |
---|---|
RoleLocator(int kind, Object container, int operand, NamePool namePool)
Create information about the role of a subexpression within its parent expression |
Method Summary | |
---|---|
String | composeErrorMessage(ItemType requiredItemType, ItemType suppliedItemType, NamePool pool)
Construct a full error message |
String | getErrorCode()
Get the error code to be produced if a type error is detected |
String | getMessage()
Construct and return the error message indicating a type error |
SourceLocator | getSourceLocator()
Get the source location (if known - return null if not known) |
void | setErrorCode(String code)
Set the error code to be produced if a type error is detected |
void | setSourceLocator(SourceLocator locator)
Set the source location |
Parameters: kind the kind of parent expression, e.g. a function call or a variable reference container the name of the object in the parent expression, e.g. a function name or instruction name. May be expressed either as a String or as an Integer nameCode in the name pool. operand Ordinal position of this subexpression, e.g. the position of an argument in namePool The name pool. Must be supplied if the second argument is an Integer namecode. Otherwise, may be null.
Returns: code The error code
Returns: the constructed error message
Parameters: code The error code