| java.lang.Object net.sf.saxon.expr.RoleLocator
RoleLocator | public class RoleLocator implements Serializable(Code) | | A RoleLocator identifies the role in which an expression is used, for example as
the third argument of the concat() function. This information is stored in an
ItemChecker or CardinalityChecker so that good diagnostics can be
achieved when run-time type errors are detected.
|
Constructor Summary | |
public | RoleLocator(int kind, Object container, int operand, NamePool namePool) Create information about the role of a subexpression within its parent expression
Parameters: kind - the kind of parent expression, e.g. |
BINARY_EXPR | final public static int BINARY_EXPR(Code) | | |
FUNCTION | final public static int FUNCTION(Code) | | |
FUNCTION_RESULT | final public static int FUNCTION_RESULT(Code) | | |
INSTRUCTION | final public static int INSTRUCTION(Code) | | |
ORDER_BY | final public static int ORDER_BY(Code) | | |
TEMPLATE_RESULT | final public static int TEMPLATE_RESULT(Code) | | |
TYPE_OP | final public static int TYPE_OP(Code) | | |
VARIABLE | final public static int VARIABLE(Code) | | |
RoleLocator | public RoleLocator(int kind, Object container, int operand, NamePool namePool)(Code) | | Create information about the role of a subexpression within its parent expression
Parameters: kind - the kind of parent expression, e.g. a function call or a variable reference Parameters: container - the name of the object in the parent expression, e.g. a function name orinstruction name. May be expressed either as a String or as an Integer nameCode in the name pool. Parameters: operand - Ordinal position of this subexpression, e.g. the position of an argument in Parameters: namePool - The name pool. Must be supplied if the second argument is an Integer namecode.Otherwise, may be null. |
getErrorCode | public String getErrorCode()(Code) | | Get the error code to be produced if a type error is detected
code The error code |
getMessage | public String getMessage()(Code) | | Construct and return the error message indicating a type error
the constructed error message |
getSourceLocator | public SourceLocator getSourceLocator()(Code) | | Get the source location (if known - return null if not known)
|
setErrorCode | public void setErrorCode(String code)(Code) | | Set the error code to be produced if a type error is detected
Parameters: code - The error code |
setSourceLocator | public void setSourceLocator(SourceLocator locator)(Code) | | Set the source location
|
|
|