Package net.sf.saxon.expr

## Class TreatExpression

- java.lang.Object
- - net.sf.saxon.expr.TreatExpression

-     public abstract class TreatExpression
      extends java.lang.Object

  Treat Expression: implements "treat as data-type ( expression )". This is a factory class only.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Expression` | `make​(Expression sequence, SequenceType type)` | Make a treat expression with error code XPDY0050
    `static Expression` | `make​(Expression sequence, SequenceType type, java.lang.String errorCode)` | Make a treat expression with a non-standard error code

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### make

          public static Expression make​(Expression sequence,
                                        SequenceType type)

      Make a treat expression with error code XPDY0050
      Parameters:
        `sequence` - the expression whose result is to be checked
        `type` - the type against which the result is to be checked
      Returns:
        the expression

    - #### make

          public static Expression make​(Expression sequence,
                                        SequenceType type,
                                        java.lang.String errorCode)

      Make a treat expression with a non-standard error code
      Parameters:
        `sequence` - the expression whose result is to be checked
        `type` - the type against which the result is to be checked
        `errorCode` - the error code to be returned if the check fails
      Returns:
        the expression