Example usage for com.google.gson.internal ConstructorConstructor get

List of usage examples for com.google.gson.internal ConstructorConstructor get

Introduction

In this page you can find the example usage for com.google.gson.internal ConstructorConstructor get.

Prototype

public <T> ObjectConstructor<T> get(TypeToken<T> typeToken) 

Source Link

Usage

From source file:com.gilecode.yagson.types.ConstructingObjectProvider.java

License:Apache License

@SuppressWarnings("unchecked")
public static <E> ObjectProvider<E> defaultOf(E instance, ConstructorConstructor cc) {
    TypeToken<E> typeToken = (TypeToken<E>) TypeToken.get(instance.getClass());
    return new ConstructingObjectProvider<E>(cc.get(typeToken));
}