Share via


StringVariableContextVariableTypeConverter Class

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

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

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:

s - the object to convert

Returns:

the string representation of the object, or null if the object cannot be converted to a string or is an object reference.

Applies to