Package net.sf.saxon.expr
Class PJConverter.General
- java.lang.Object
-
- net.sf.saxon.expr.PJConverter
-
- net.sf.saxon.expr.PJConverter.General
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- PJConverter
public static class PJConverter.General extends PJConverter
General-purpose converter when nothing more specific is available. (Provided largely as a transition aid)- See Also:
- Serialized Form
-
-
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.General, PJConverter.Identity, PJConverter.IntegerValueToBigInteger, PJConverter.IntegerValueToByte, PJConverter.IntegerValueToChar, PJConverter.IntegerValueToInt, PJConverter.IntegerValueToLong, PJConverter.IntegerValueToShort, PJConverter.NumericValueToBigDecimal, PJConverter.NumericValueToDouble, PJConverter.NumericValueToFloat, PJConverter.QualifiedNameValueToQName, PJConverter.StringValueToChar, PJConverter.StringValueToString, PJConverter.ToArray, PJConverter.ToCollection, PJConverter.ToNull, PJConverter.ToSequenceExtent, PJConverter.ToSequenceIterator, PJConverter.UnwrapExternalObject
-
-
Field Summary
Fields Modifier and Type Field Description static PJConverter.General
INSTANCE
-
Constructor Summary
Constructors Constructor Description General()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
convert(ValueRepresentation value, java.lang.Class targetClass, XPathContext context)
Convert an XPath value to a Java value of a specified class-
Methods inherited from class net.sf.saxon.expr.PJConverter
allocate, allocateNodeListCreator, compile, getEquivalentItemType
-
-
-
-
Field Detail
-
INSTANCE
public static PJConverter.General INSTANCE
-
-
Method Detail
-
convert
public java.lang.Object convert(ValueRepresentation 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 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
-
-