Class OperandRole

java.lang.Object
net.sf.saxon.expr.OperandRole

public class OperandRole extends Object
Defines the role of a child expression relative to its parent expression. The properties of an operand role depend only on the kind of expression and not on the actual arguments supplied to a specific instance of the kind of operand.
  • Field Details Link icon

    • SETS_NEW_FOCUS Link icon

      public static final int SETS_NEW_FOCUS
      See Also:
    • USES_NEW_FOCUS Link icon

      public static final int USES_NEW_FOCUS
      See Also:
    • HIGHER_ORDER Link icon

      public static final int HIGHER_ORDER
      See Also:
    • IN_CHOICE_GROUP Link icon

      public static final int IN_CHOICE_GROUP
      See Also:
    • CONSTRAINED_CLASS Link icon

      public static final int CONSTRAINED_CLASS
      See Also:
    • SINGLETON Link icon

      public static final int SINGLETON
      See Also:
    • HAS_SPECIAL_FOCUS_RULES Link icon

      public static final int HAS_SPECIAL_FOCUS_RULES
      See Also:
    • SAME_FOCUS_ACTION Link icon

      public static final OperandRole SAME_FOCUS_ACTION
    • FOCUS_CONTROLLING_SELECT Link icon

      public static final OperandRole FOCUS_CONTROLLING_SELECT
    • FOCUS_CONTROLLED_ACTION Link icon

      public static final OperandRole FOCUS_CONTROLLED_ACTION
    • INSPECT Link icon

      public static final OperandRole INSPECT
    • ABSORB Link icon

      public static final OperandRole ABSORB
    • REPEAT_INSPECT Link icon

      public static final OperandRole REPEAT_INSPECT
    • REPEAT_NAVIGATE Link icon

      public static final OperandRole REPEAT_NAVIGATE
    • FLWOR_TUPLE_CONSTRAINED Link icon

      public static final OperandRole FLWOR_TUPLE_CONSTRAINED
    • SINGLE_ATOMIC Link icon

      public static final OperandRole SINGLE_ATOMIC
    • ATOMIC_SEQUENCE Link icon

      public static final OperandRole ATOMIC_SEQUENCE
    • CONSTRAINED_SINGLE_ATOMIC Link icon

      public static final OperandRole CONSTRAINED_SINGLE_ATOMIC
    • CONSTRAINED_ATOMIC_SEQUENCE Link icon

      public static final OperandRole CONSTRAINED_ATOMIC_SEQUENCE
    • NEW_FOCUS_ATOMIC Link icon

      public static final OperandRole NEW_FOCUS_ATOMIC
    • PATTERN Link icon

      public static final OperandRole PATTERN
  • Constructor Details Link icon

  • Method Details Link icon

    • withConstraint Link icon

      public OperandRole withConstraint(Predicate<Expression> constraint)
      Create an operand role based on this one, but with a constraint
      Parameters:
      constraint - the constraint to be applied
      Returns:
      the new operand role (the original is unchanged)
    • withConstrainedClass Link icon

      public OperandRole withConstrainedClass()
      Create an operand role based on this one, but with a constrained class property
      Returns:
      the new operand role (the original is unchanged)
    • setsNewFocus Link icon

      public boolean setsNewFocus()
      Ask whether the child expression sets the focus for evaluation of other child expressions
      Returns:
      true if the child expression is evaluated with the same focus as its parent expression
    • hasSameFocus Link icon

      public boolean hasSameFocus()
      Ask whether the child expression is evaluated with the same focus as its parent expression
      Returns:
      true if the child expression is evaluated with the same focus as its parent expression
    • hasSpecialFocusRules Link icon

      public boolean hasSpecialFocusRules()
    • isHigherOrder Link icon

      public boolean isHigherOrder()
      Ask whether the operand is a higher-order operand
      Returns:
      true if the operand is higher-order
    • isEvaluatedRepeatedly Link icon

      public boolean isEvaluatedRepeatedly()
      Ask whether the operand is a evaluated repeatedly during a single evaluation of the parent expression
      Returns:
      true if the operand is evaluated repeatedly
    • isConstrainedClass Link icon

      public boolean isConstrainedClass()
      Ask whether the operand is constrained to be of a particular class (preventing substitution of a variable binding)
      Returns:
      true if the operand expression is constrained to be of a particular class
    • setConstraint Link icon

      public void setConstraint(Predicate<Expression> constraint)
      Set a constraint on the expression that can be associated with this operand type
      Parameters:
      constraint - the constraint that must be satisfied by the relevant expression
    • getConstraint Link icon

      public Predicate<Expression> getConstraint()
      Get any constraint on the expression that can be associated with this operand type
      Returns:
      any constraint that has been registered, or null
    • getUsage Link icon

      public OperandUsage getUsage()
      Get the usage of the operand
      Returns:
      the usage
    • getRequiredType Link icon

      public SequenceType getRequiredType()
      Get the required type of the operand
      Returns:
      the required type
    • isInChoiceGroup Link icon

      public boolean isInChoiceGroup()
      Ask whether the operand is a member of a choice group
      Returns:
      true if the operand is in a choice group
    • getTypeDeterminedUsage Link icon

      public static OperandUsage getTypeDeterminedUsage(ItemType type)
      Static method to get the type-determined usage for a particular ItemType
      Parameters:
      type - the required type
      Returns:
      the type-determined operand usage
    • modifyProperty Link icon

      public OperandRole modifyProperty(int property, boolean on)
    • getProperties Link icon

      public int getProperties()