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 Detail

      • getTargetClass

        Class<T> getTargetClass()
      • 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:
      • instantiate

        T instantiate​(Map<String,​javax.json.JsonObject> fieldMap)
      • getFieldValue

        Object getFieldValue​(String fieldName,
                             T object)
      • deserializeField

        Object deserializeField​(String fieldName,
                                javax.json.JsonObject jsonObject)
      • serializeField

        javax.json.JsonObject serializeField​(String fieldName,
                                             T object)
      • addToObject

        void addToObject​(String fieldName,
                         javax.json.JsonObject jsonObject,
                         T object)
      • addToJson

        void addToJson​(javax.json.JsonObjectBuilder jsonObjectBuilder,
                       String fieldName,
                       T object)
      • deserialize

        T deserialize​(javax.json.JsonObject jsonObject)
      • deserialize

        T deserialize​(String json)
      • serialize

        javax.json.JsonObject serialize​(T object)