public enum DefaultConverterFactory extends Enum<DefaultConverterFactory> implements ConverterFactory
ConverterFactory
, handling all standard
converters defined in com.vaadin.flow.data.converters
package.Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
<P,M> Optional<Converter<P,M>> |
newInstance(Class<P> presentationType,
Class<M> modelType)
Attempts to create a
Converter instance, capable to handle
conversion between the given presentation and model types. |
static DefaultConverterFactory |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DefaultConverterFactory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DefaultConverterFactory INSTANCE
public static DefaultConverterFactory[] values()
for (DefaultConverterFactory c : DefaultConverterFactory.values()) System.out.println(c);
public static DefaultConverterFactory valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic <P,M> Optional<Converter<P,M>> newInstance(Class<P> presentationType, Class<M> modelType)
ConverterFactory
Converter
instance, capable to handle
conversion between the given presentation and model types.
An empty Optional
is returned if a conversion cannot be
performed.newInstance
in interface ConverterFactory
P
- The presentation type.M
- The model type.presentationType
- presentation type, not null.modelType
- model type, not null.Converter
instance wrapped into an Optional
, or
an empty Optional
if no suitable converter is available.Copyright © 2025. All rights reserved.