Here you can find the source of fromString(Class> clazz, String stringValue)
private static Object fromString(Class<?> clazz, String stringValue)
//package com.java2s; public class Main { private static Object fromString(Class<?> clazz, String stringValue) { if (String.class == clazz) { return stringValue; } else if (Long.class == clazz) { return Long.valueOf(stringValue); }// www .j a v a 2s. c om // It seems only String and Long have chances of being used. Not adding other // classes to avoid having dead code, even though without them this looks incomplete. throw new IllegalArgumentException( "Instantiating " + clazz + " from string representation is not supported. Most likely an" + " incompatible version of google-http-client was used."); } }