Class PJConverter.ToZeroOrMore

  • Enclosing class:

    public static class PJConverter.ToZeroOrMore
    extends PJConverter
    Converter for use when the target class is ZeroOrMore, which allows any sequence but is a generic (parameterized) class so there is compile-time information about the type of items
    • Constructor Detail

      • ToZeroOrMore

        public ToZeroOrMore()
    • Method Detail

      • convert

        public ZeroOrMore<Item> convert​(Sequence value,
                                        java.lang.Class<?> targetClass,
                                        XPathContext context)
                                 throws XPathException
        Description copied from class: PJConverter
        Convert an XPath value to a Java value of a specified class
        Specified by:
        convert in class PJConverter
        value - the supplied XPath value
        targetClass - the class of the required Java value
        context - the XPath dynamic context
        the corresponding Java value, which is guaranteed to be an instance of the target class (except that an empty sequence is converted to null)
        XPathException - if the conversion is not possible or fails