Interface StringInterpreter

  • All Known Implementing Classes:
    StringInterpreterEnum, StringInterpreterFactory.DefaultStringInterpreter

    public interface StringInterpreter
    Defines the interface for the String interpreter. This allows users to provide custom String interpreter implementations that can optimise String processing for an application by performing code generation for a sub-set of Strings.
    • Method Detail

      • convertString

        String convertString​(Class<?> c,
                             String s,
                             String attrName,
                             Class<?> propEditorClass,
                             boolean isNamedAttribute)
        Generates the source code that represents the conversion of the string value to the appropriate type.
        Parameters:
        c - The target class to which to coerce the given string
        s - The string value
        attrName - The name of the attribute whose value is being supplied
        propEditorClass - The property editor for the given attribute
        isNamedAttribute - true if the given attribute is a named attribute (that is, specified using the jsp:attribute standard action), and false otherwise
        Returns:
        the string representing the code that will be inserted into the source code for the Servlet generated for the JSP.