Example usage for com.vaadin.shared.communication UidlValue UidlValue

List of usage examples for com.vaadin.shared.communication UidlValue UidlValue

Introduction

In this page you can find the example usage for com.vaadin.shared.communication UidlValue UidlValue.

Prototype

public UidlValue(Object value) 

Source Link

Usage

From source file:org.vaadin.alump.offlinebuilder.client.offline.JsonEncoder.java

License:Open Source License

private static JSONValue encodeChildValue(Object value, Type collectionType, int typeIndex,
        ApplicationConnection connection) {
    if (collectionType == null) {
        return encode(new UidlValue(value), null, connection);
    } else {//from  w ww . j a  v a2 s.  c o m
        assert collectionType.getParameterTypes() != null
                && collectionType.getParameterTypes().length > typeIndex
                && collectionType
                        .getParameterTypes()[typeIndex] != null : "Proper generics required for encoding child value, assertion failed for "
                                + collectionType;
        Type childType = collectionType.getParameterTypes()[typeIndex];
        return encode(value, childType, connection);
    }
}