A - application type of the converter used by this classM - model type of the converter used by this classpublic class ConvertedModelType<A,M extends Serializable> extends Object implements ModelType
ModelType implementation that wraps a model type for performing
type conversions on together with a ModelEncoder.
For internal use only. May be renamed or removed in a future release.
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Type applicationType)
Checks whether this type can accept application values of the given type.
|
Serializable |
applicationToModel(Object applicationValue,
PropertyFilter filter)
Creates a model value representation of the provided application value.
|
void |
createInitialValue(StateNode node,
String property)
Create initial value for the given
property and set it for the
node. |
Type |
getJavaType()
Gets the Java
Type that this model encapsulates. |
ModelType |
getWrappedModelType()
Gets the model type describing the data actually stored in the model.
|
Object |
modelToApplication(Serializable modelValue)
Creates a representation of the provided model value that is intended for
use in application code.
|
elemental.json.JsonValue |
toJson()
Creates a JSON representation of this model type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSupportedTypesStringpublic Object modelToApplication(Serializable modelValue)
ModelTypemodelToApplication in interface ModelTypemodelValue - the model value to convertpublic Serializable applicationToModel(Object applicationValue, PropertyFilter filter)
ModelTypeFor application values that contain properties (i.e. beans), the provided filter is used to determine which properties from the bean should be included in the model representation.
applicationToModel in interface ModelTypeapplicationValue - the user value to convertfilter - the filter to use to determine which properties to include,
not nullpublic boolean accepts(Type applicationType)
ModelTypepublic Type getJavaType()
ModelTypeType that this model encapsulates.getJavaType in interface ModelTypepublic elemental.json.JsonValue toJson()
ModelTypepublic void createInitialValue(StateNode node, String property)
ModelTypeproperty and set it for the
node.createInitialValue in interface ModelTypenode - the node where the initial value should be set the
propertyproperty - the property in the node whose initial value needs to
be createdpublic ModelType getWrappedModelType()
Copyright © 2025. All rights reserved.