# Class StringInterpreterFactory.DefaultStringInterpreter

java.lang.Object
org.apache.jasper.compiler.StringInterpreterFactory.DefaultStringInterpreter

All Implemented Interfaces:
  `StringInterpreter`

Direct Known Subclasses:
  `StringInterpreterEnum`

Enclosing class:
  `StringInterpreterFactory`

public static class StringInterpreterFactory.DefaultStringInterpreter extends Object implements StringInterpreter

## Constructor Summary

Constructors
Constructor
Description
`DefaultStringInterpreter()`

## Method Summary

Modifier and Type
Method
Description
`protected String`
`coerceToOtherType(Class<?> c, String s, boolean isNamedAttribute)`
Intended to be used by sub-classes that don't need/want to re-implement the logic in `convertString(Class, String, String, Class, boolean)`.
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DefaultStringInterpreter

public DefaultStringInterpreter()

## Method Details

### convertString

public String convertString(Class<?> c, String s, String attrName, Class<?> propEditorClass, boolean isNamedAttribute)
Description copied from interface: `StringInterpreter`
Generates the source code that represents the conversion of the string value to the appropriate type.

Specified by:
  `convertString` in interface `StringInterpreter`
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.

### coerceToOtherType

protected String coerceToOtherType(Class<?> c, String s, boolean isNamedAttribute)
Intended to be used by sub-classes that don't need/want to re-implement the logic in `convertString(Class, String, String, Class, boolean)`.

Parameters:
  `c` - unused
  `s` - unused
  `isNamedAttribute` - unused
Returns:
  Always `null`