Module com.gluonhq.cloudlink.client
Interface ConnectMetadata<T>
-
- Type Parameters:
T
- the generic type for which this metadata class contains information
- All Known Implementing Classes:
ConnectMetadataClass
,ConnectMetadataMap
,ConnectMetadataString
public interface ConnectMetadata<T>
A class that contains metadata information about its generic type. The metadata that is stored must be be enough to be able to serialize and deserialize a complete instance of the generic type and a single element of the instance of the generic type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addToJson(javax.json.JsonObjectBuilder jsonObjectBuilder, String fieldName, T object)
void
addToObject(String fieldName, javax.json.JsonObject jsonObject, T object)
T
deserialize(String json)
T
deserialize(javax.json.JsonObject jsonObject)
Object
deserializeField(String fieldName, javax.json.JsonObject jsonObject)
Object
getFieldValue(String fieldName, T object)
Map<String,ObservableList>
getObservableLists(T target)
Map<String,ObservableValue>
getObservables(T target)
Returns a map with all the observables that can actively be listened on.Class<T>
getTargetClass()
T
instantiate(Map<String,javax.json.JsonObject> fieldMap)
javax.json.JsonObject
serialize(T object)
javax.json.JsonObject
serializeField(String fieldName, T object)
-
-
-
Method Detail
-
getObservables
Map<String,ObservableValue> getObservables(T target)
Returns a map with all the observables that can actively be listened on. The keys are strings that uniquely map to a single field in the metadata. The values are instances of ObservableValue.- Returns:
-
getObservableLists
Map<String,ObservableList> getObservableLists(T target)
-
addToJson
void addToJson(javax.json.JsonObjectBuilder jsonObjectBuilder, String fieldName, T object)
-
deserialize
T deserialize(javax.json.JsonObject jsonObject)
-
serialize
javax.json.JsonObject serialize(T object)
-
-