Class PJConverter.StringValueToString

    • Constructor Detail

      • StringValueToString

        public StringValueToString()
    • 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 class PJConverter
        Parameters:
        value - the supplied XPath value
        targetClass - the class of the required Java value
        context - 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

        public java.lang.String compile​(java.lang.String var,
                                        java.lang.Class targetClass,
                                        CodeGeneratorService compiler)
        Description copied from class: PJConverter
        Generate Java code to implement the type conversion
        Overrides:
        compile in class PJConverter
        Parameters:
        var - the name of a variable whose value will be the XPath ValueRepresentation to be converted
        targetClass - the required class of the Java value
        compiler - provides supporting services by callback @return the text of a Java expression whose result will be a Java object/value of the required type