StringVariableContextVariableTypeConverter Class
- java.
lang. Object - com.
microsoft. semantickernel. contextvariables. ContextVariableTypeConverter<T> - com.
microsoft. semantickernel. contextvariables. converters. StringVariableContextVariableTypeConverter
- com.
- com.
public class StringVariableContextVariableTypeConverter
extends ContextVariableTypeConverter<java.lang.String>
A ContextVariableTypeConverter<T> for java.lang.String variables. Use ContextVariableTypes.getGlobalVariableTypeForClass(String.class) to get an instance of this class.
Constructor Summary
| Constructor | Description |
|---|---|
| StringVariableContextVariableTypeConverter() |
Creates a new instance of the StringVariableContextVariableTypeConverter class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static java.lang.String |
convertToString(Object s)
Converts the specified object to a string. |
Methods inherited from ContextVariableTypeConverter
Methods inherited from java.lang.Object
Constructor Details
StringVariableContextVariableTypeConverter
public StringVariableContextVariableTypeConverter()
Creates a new instance of the StringVariableContextVariableTypeConverter class.
Method Details
convertToString
public static String convertToString(Object s)
Converts the specified object to a string. Has special handling for ContextVariable<T> objects and for objects that look like an object reference
Parameters:
Returns:
null
if the object cannot be converted to a string or is an object reference.