Guava GWT compatible libs 13.0.1-redhat-1

com.google.common.base
Class Absent_CustomFieldSerializer

java.lang.Object
  extended by com.google.common.base.Absent_CustomFieldSerializer

@GwtCompatible
public class Absent_CustomFieldSerializer
extends Object

Custom GWT serializer for Absent.

GWT can serialize an absent Optional on its own, but the resulting object is a different instance than the singleton Absent.INSTANCE, which breaks equality. We implement a custom serializer to maintain the singleton property.

Author:
Chris Povirk

Constructor Summary
Absent_CustomFieldSerializer()
           
 
Method Summary
static void deserialize(com.google.gwt.user.client.rpc.SerializationStreamReader reader, com.google.common.base.Absent instance)
           
static com.google.common.base.Absent instantiate(com.google.gwt.user.client.rpc.SerializationStreamReader reader)
           
static void serialize(com.google.gwt.user.client.rpc.SerializationStreamWriter writer, com.google.common.base.Absent instance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Absent_CustomFieldSerializer

public Absent_CustomFieldSerializer()
Method Detail

deserialize

public static void deserialize(com.google.gwt.user.client.rpc.SerializationStreamReader reader,
                               com.google.common.base.Absent instance)

instantiate

public static com.google.common.base.Absent instantiate(com.google.gwt.user.client.rpc.SerializationStreamReader reader)

serialize

public static void serialize(com.google.gwt.user.client.rpc.SerializationStreamWriter writer,
                             com.google.common.base.Absent instance)

Guava GWT compatible libs 13.0.1-redhat-1

Copyright © 2010-2013 JBoss by Red Hat. All Rights Reserved.