Constructor
<abstract> new ConverterFactory()
Contract for a ConverterFactory that provides a factory method to create a converter instance for
the requested type. JET provides 2 factory implementations for number and datetime types that
implement this contract. Customers can register custom converter factories for the supported
types or create and register factories for new types altogether.
Fields
-
<static> CONVERTER_TYPE_DATETIME :string
-
Default type for a factory used to create datetime converters. This type is passed to the Validation.converterFactory method to retrieve the datetime converter factory of type oj.DateTimeConverterFactory.
- Source:
-
<static> CONVERTER_TYPE_NUMBER :string
-
Default type for a factory used to create number converters. This type is passed to the Validation.converterFactory method to retrieve the number converter factory of type oj.NumberConverterFactory.
- Source:
Methods
-
<static> createConverter(options) → {Object}
-
Creates an immutable converter instance of the type the factory implements.
Parameters:
Name Type Description options
Object | null an object literal containing properties required by the converter for its initialization. The properties provided in the options is implementation specific. - Source:
Throws:
if an unrecognized type was provided- Type
- TypeError
Returns:
a converter instance.- Type
- Object