Package net.sf.saxon.expr
Class PJConverter.StringValueToString
java.lang.Object
net.sf.saxon.expr.PJConverter
net.sf.saxon.expr.PJConverter.StringValueToString
- All Implemented Interfaces:
Serializable
- Enclosing class:
PJConverter
- See Also:
-
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompile(String var, Class targetClass, CodeGeneratorService compiler) Generate Java code to implement the type conversionconvert(ValueRepresentation 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, getEquivalentItemType
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
StringValueToString
public StringValueToString()
-
-
Method Details
-
convert
public Object convert(ValueRepresentation value, Class targetClass, XPathContext context) throws XPathException Description copied from class:PJConverterConvert an XPath value to a Java value of a specified class- Specified by:
convertin 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
-
compile
Description copied from class:PJConverterGenerate Java code to implement the type conversion- Overrides:
compilein classPJConverter- Parameters:
var- the name of a variable whose value will be the XPath ValueRepresentation to be convertedtargetClass- the required class of the Java valuecompiler- provides supporting services by callback @return the text of a Java expression whose result will be a Java object/value of the required type
-