List of usage examples for com.vaadin.client.metadata Type getParameterTypes
public Type[] getParameterTypes()
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 {/* w w w . j a va2 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); } }