Class Axis


  • public class Axis
    extends java.lang.Object
    Internal SAXPath class that contains constants representing XPath operators to avoid a lot of string comparisons.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Axis()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String lookup​(int axisNum)
      Returns the name of the axis.
      static int lookup​(java.lang.String axisName)
      Returns the code for an axis given its name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Axis

        private Axis()
    • Method Detail

      • lookup

        public static java.lang.String lookup​(int axisNum)

        Returns the name of the axis.

        Parameters:
        axisNum - the axis code
        Returns:
        the name of the axis such as might be used in an XPath expression
        Throws:
        JaxenRuntimeException - if the number does not represent one of the 13 XPath axes
      • lookup

        public static int lookup​(java.lang.String axisName)

        Returns the code for an axis given its name.

        Parameters:
        axisName - the name of the axis: child, parent, descendant, descendant-or-self, etc.
        Returns:
        the axis code