| Modifier and Type | Method and Description |
|---|---|
java.lang.reflect.GenericArrayType |
arrayOf(java.lang.reflect.Type componentType)
Returns an array type whose elements are all instances of
componentType. |
<T> T |
fromJson(java.io.File file,
java.lang.reflect.Type typeOfT)
This method deserializes the Json read from the specified reader into an object of the
specified type.
|
<T> T |
fromJson(java.lang.String json,
java.lang.reflect.Type type)
This method deserializes the specified Json into an object of the specified type.
|
java.lang.reflect.ParameterizedType |
newParameterizedType(java.lang.reflect.Type rawType,
java.lang.reflect.Type... typeArguments)
Returns a new parameterized type, applying
typeArguments to rawType. |
java.lang.String |
toJson(java.lang.Object src,
java.lang.reflect.Type typeOfSrc)
This method serializes the specified object, including those of generic types, into its
equivalent Json representation.
|
java.lang.String toJson(java.lang.Object src,
java.lang.reflect.Type typeOfSrc)
Jolyglot.toJson(Object) instead.src - the object for which JSON representation is to be createdtypeOfSrc - The specific genericized type of src.src<T> T fromJson(java.lang.String json,
java.lang.reflect.Type type)
throws java.lang.RuntimeException
Jolyglot.fromJson(String, Class) instead. If you have the Json in a File instead of
a String, use fromJson(File, Type) instead.java.lang.RuntimeException<T> T fromJson(java.io.File file,
java.lang.reflect.Type typeOfT)
throws java.lang.RuntimeException
Jolyglot.fromJson(File, Class) instead. If you have the Json in a
String form instead of a File, use fromJson(String, Type) instead.T - the type of the desired objectfile - the file producing Json from which the object is to be deserializedtypeOfT - The specific genericized type of src.java.lang.RuntimeExceptionjava.lang.reflect.GenericArrayType arrayOf(java.lang.reflect.Type componentType)
componentType.java.lang.reflect.ParameterizedType newParameterizedType(java.lang.reflect.Type rawType,
java.lang.reflect.Type... typeArguments)
typeArguments to rawType.