Package net.sf.saxon.expr
Class PJConverter.ToZeroOrMore
java.lang.Object
net.sf.saxon.expr.PJConverter
net.sf.saxon.expr.PJConverter.ToZeroOrMore
- Enclosing class:
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-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.saxon.expr.PJConverter
PJConverter.AnyURIValueToURI, PJConverter.AnyURIValueToURL, PJConverter.Atomic, PJConverter.BooleanValueToBoolean, PJConverter.CalendarValueToCalendar, PJConverter.CalendarValueToDate, PJConverter.CalendarValueToInstant, PJConverter.CalendarValueToLocalDateTime, PJConverter.CalendarValueToOffsetDateTime, PJConverter.CalendarValueToZonedDateTime, PJConverter.ConditionalUnwrapExternalObject, PJConverter.DateValueToLocalDate, PJConverter.General, PJConverter.Identity, PJConverter.IntegerValueToBigInteger, PJConverter.IntegerValueToByte, PJConverter.IntegerValueToChar, PJConverter.IntegerValueToInt, PJConverter.IntegerValueToLong, PJConverter.IntegerValueToShort, PJConverter.NumericValueToBigDecimal, PJConverter.NumericValueToDouble, PJConverter.NumericValueToFloat, PJConverter.QualifiedNameValueToQName, PJConverter.StringItemToChar, PJConverter.StringItemToString, PJConverter.StringItemToUnicodeString, PJConverter.ToArray, PJConverter.ToCollection, PJConverter.ToNull, PJConverter.ToOne, PJConverter.ToOneOrMore, PJConverter.ToSequenceExtent, PJConverter.ToSequenceIterator, PJConverter.ToZeroOrMore, PJConverter.ToZeroOrOne, PJConverter.UnwrapExternalObject
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert
(Sequence value, Class<?> targetClass, XPathContext context) Convert an XPath value to a Java value of a specified classMethods inherited from class net.sf.saxon.expr.PJConverter
allocate, allocateNodeListCreator, getEquivalentSequenceType, getParameterizedSequenceType
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ToZeroOrMore
public ToZeroOrMore()
-
-
Method Details
-
convert
public ZeroOrMore<Item> convert(Sequence value, 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 classPJConverter
- Parameters:
value
- the supplied XPath valuetargetClass
- the class of the required Java valuecontext
- the XPath dynamic context- Returns:
- the corresponding Java value, which is guaranteed to be an instance of the target class (except that an empty sequence is converted to null)
- Throws:
XPathException
- if the conversion is not possible or fails
-