com.vaadin.flow.templatemodel.
Class AbstractBasicModelType<T>
- java.lang.Object
-
- com.vaadin.flow.templatemodel.AbstractBasicModelType<T>
-
Type Parameters:
T
- the (basic) Java type used by this model typeAll Implemented Interfaces:
Direct Known Subclasses:
@Deprecated public abstract class AbstractBasicModelType<T> extends Object implements ModelType
Deprecated.Template model and model types are not supported for lit template, but you can use@Id
mapping and the component API or the element API with property synchronization instead. Polymer template support is deprecated - we recommend you to useLitTemplate
instead. Read more details from the Vaadin blog.Common abstract class with generic functionality for basic mode type.
For internal use only. May be renamed or removed in a future release.
Since:
1.0
Author:
Vaadin Ltd
See Also:
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBasicModelType(Class<T> type)
Deprecated.
-
Method Summary
All Methods Modifier and Type Method Description boolean
accepts(Type applicationType)
Deprecated.
Checks whether this type can accept application values of the given type.
protected Object
convertToApplication(Serializable modelValue)
Deprecated.
Converts the given model value to the application type of this model type.
void
createInitialValue(StateNode node, String property)
Deprecated.
Create initial value for the given
property
and set it for thenode
.Class<T>
getJavaType()
Deprecated.
Gets the Java
Type
that this model encapsulates.protected static <M> Map<Class<?>,M>
loadBasicTypes(Function<Class<?>,M> factory)
Deprecated.
elemental.json.JsonValue
toJson()
Deprecated.
Creates a JSON representation of this model type.
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.templatemodel.ModelType
applicationToModel, modelToApplication
-
-
-
-
Method Detail
-
accepts
public boolean accepts(Type applicationType)
Deprecated.Description copied from interface:
ModelType
Checks whether this type can accept application values of the given type. The method only considers this actual type, not the types of sub properties or list items.
-
getJavaType
public Class<T> getJavaType()
Deprecated.Description copied from interface:
ModelType
Gets the Java
Type
that this model encapsulates.Specified by:
getJavaType
in interfaceModelType
Returns:
the java type
-
toJson
public elemental.json.JsonValue toJson()
Deprecated.Description copied from interface:
ModelType
Creates a JSON representation of this model type.
-
createInitialValue
public void createInitialValue(StateNode node, String property)
Deprecated.Description copied from interface:
ModelType
Create initial value for the given
property
and set it for thenode
.Specified by:
createInitialValue
in interfaceModelType
Parameters:
node
- the node where the initial value should be set theproperty
property
- the property in thenode
whose initial value needs to be created
-
convertToApplication
protected Object convertToApplication(Serializable modelValue)
Deprecated.Converts the given model value to the application type of this model type. The conversion automatically handles default values for primitive types and conversion of client-originated numbers to the expected Java number type.
Parameters:
modelValue
- the model value to convertReturns:
the converted value, not
null
if the application type is a primitive
-
-