Example usage for com.google.gwt.user.client.rpc.core.java.util Map_CustomFieldSerializerBase deserialize

List of usage examples for com.google.gwt.user.client.rpc.core.java.util Map_CustomFieldSerializerBase deserialize

Introduction

In this page you can find the example usage for com.google.gwt.user.client.rpc.core.java.util Map_CustomFieldSerializerBase deserialize.

Prototype

@SuppressWarnings("unchecked")
    public static void deserialize(SerializationStreamReader streamReader, Map instance)
            throws SerializationException 

Source Link

Usage

From source file:com.ait.ext4j.client.core.FastMap_CustomFieldSerializer.java

License:Apache License

@SuppressWarnings("rawtypes")
public static void deserialize(SerializationStreamReader streamReader, FastMap instance)
        throws SerializationException {
    Map_CustomFieldSerializerBase.deserialize(streamReader, instance);
}

From source file:com.google.common.collect.ImmutableEnumMap_CustomFieldSerializer.java

License:Apache License

public static <K extends Enum<K>, V> ImmutableEnumMap<?, ?> instantiate(SerializationStreamReader reader)
        throws SerializationException {
    Map<K, V> deserialized = Maps.newHashMap();
    Map_CustomFieldSerializerBase.deserialize(reader, deserialized);
    /*/*w  ww .ja  v  a2 s  . c o m*/
     * It is safe to cast to ImmutableEnumSet because in order for it to be
     * serialized as an ImmutableEnumSet, it must be non-empty to start
     * with.
     */
    return (ImmutableEnumMap<?, ?>) Maps.immutableEnumMap(deserialized);
}

From source file:com.google.common.collect.ImmutableSortedMap_CustomFieldSerializerBase.java

License:Apache License

static ImmutableSortedMap<Object, Object> instantiate(SerializationStreamReader reader)
        throws SerializationException {
    /*/*  ww  w  .ja v  a2s  .co  m*/
     * Nothing we can do, but we're already assuming the serialized form is
     * correctly typed, anyway.
     */
    @SuppressWarnings("unchecked")
    Comparator<Object> comparator = (Comparator<Object>) reader.readObject();

    SortedMap<Object, Object> entries = new TreeMap<Object, Object>(comparator);
    Map_CustomFieldSerializerBase.deserialize(reader, entries);

    return ImmutableSortedMap.orderedBy(comparator).putAll(entries).build();
}

From source file:com.google.common.collect.JdkBackedImmutableBiMap_CustomFieldSerializer.java

License:Apache License

public static ImmutableBiMap<Object, Object> instantiate(SerializationStreamReader reader)
        throws SerializationException {
    Map<Object, Object> entries = new LinkedHashMap<>();
    Map_CustomFieldSerializerBase.deserialize(reader, entries);
    return ImmutableBiMap.copyOf(entries);
}

From source file:com.google.common.collect.JdkBackedImmutableMap_CustomFieldSerializer.java

License:Apache License

public static ImmutableMap<Object, Object> instantiate(SerializationStreamReader reader)
        throws SerializationException {
    Map<Object, Object> entries = new LinkedHashMap<>();
    Map_CustomFieldSerializerBase.deserialize(reader, entries);
    return ImmutableMap.copyOf(entries);
}

From source file:com.google.common.collect.RegularImmutableBiMap_CustomFieldSerializer.java

License:Apache License

public static RegularImmutableBiMap<Object, Object> instantiate(SerializationStreamReader reader)
        throws SerializationException {
    Map<Object, Object> entries = new LinkedHashMap<Object, Object>();
    Map_CustomFieldSerializerBase.deserialize(reader, entries);
    /*/*w ww. j a  v  a 2  s  .co  m*/
     * For this custom field serializer to be invoked, the map must have been
     * RegularImmutableBiMap before it's serialized. Since RegularImmutableBiMap
     * always have one or more elements, ImmutableBiMap.copyOf always return a
     * RegularImmutableBiMap back.
     */
    return (RegularImmutableBiMap<Object, Object>) ImmutableBiMap.copyOf(entries);
}

From source file:com.google.common.collect.RegularImmutableMap_CustomFieldSerializer.java

License:Apache License

public static RegularImmutableMap<Object, Object> instantiate(SerializationStreamReader reader)
        throws SerializationException {
    Map<Object, Object> entries = new LinkedHashMap<Object, Object>();
    Map_CustomFieldSerializerBase.deserialize(reader, entries);
    /*//w w  w  . java  2s.com
     * For this custom field serializer to be invoked, the map must have been
     * RegularImmutableMap before it's serialized.  Since RegularImmutableMap
     * always have two or more elements, ImmutableMap.copyOf always return
     * a RegularImmutableMap back.
     */
    return (RegularImmutableMap<Object, Object>) ImmutableMap.copyOf(entries);
}

From source file:com.pyx4j.test.domain.simple.impl.SerialExtValueMap_CustomFieldSerializer.java

License:Apache License

public static void deserialize(SerializationStreamReader streamReader, SerialExtValueMap instance)
        throws SerializationException {
    Map_CustomFieldSerializerBase.deserialize(streamReader, instance);
}

From source file:com.pyx4j.test.domain.simple.impl.SerialValueMap_CustomFieldSerializer.java

License:Apache License

public static void deserialize(SerializationStreamReader streamReader, SerialValueMap instance)
        throws SerializationException {
    Map_CustomFieldSerializerBase.deserialize(streamReader, instance.map);
}