@@ -47,7 +47,7 @@ class Inspect {
47
47
* Return the contents of any JSON serializable object in a human-friendly, readable format
48
48
* @param obj the object to serialize
49
49
*/
50
- @JvmStatic inline fun <reified T > dump (obj : T ): String {
50
+ @JvmStatic fun <T > dump (obj : T ): String {
51
51
val gson = GsonBuilder ().setPrettyPrinting().create()
52
52
val json = gson.toJson(obj)
53
53
return json.replace(" \" " ," " )
@@ -57,13 +57,13 @@ class Inspect {
57
57
* Prints the contents of any JSON serializable object in a human-friendly, readable format
58
58
* @param obj the object to serialize
59
59
*/
60
- @JvmStatic inline fun <reified T > printDump (obj : T ) = println (dump(obj))
60
+ @JvmStatic fun <T > printDump (obj : T ) = println (dump(obj))
61
61
62
62
/* *
63
63
* Return the list of JSON serializable objects into a human-friendly Ascii Table
64
64
* @param objs the rows to use in the Ascii Table
65
65
*/
66
- @JvmStatic inline fun <reified T > dumpTable (objs : Iterable <T >, headers : Iterable <String >? = null): String {
66
+ @JvmStatic fun <T > dumpTable (objs : Iterable <T >, headers : Iterable <String >? = null): String {
67
67
val rows = objs.toList()
68
68
val mapRows = toListMap(rows)
69
69
val keys = headers ? : allKeys(mapRows)
@@ -114,7 +114,7 @@ class Inspect {
114
114
* Return the list of JSON serializable objects into a human-friendly Ascii Table
115
115
* @param objs the rows to use in the Ascii Table
116
116
*/
117
- @JvmStatic inline fun <reified T > printDumpTable (objs : Iterable <T >, headers : Iterable <String >? = null) = println (dumpTable(objs, headers))
117
+ @JvmStatic fun <T > printDumpTable (objs : Iterable <T >, headers : Iterable <String >? = null) = println (dumpTable(objs, headers))
118
118
119
119
fun allKeys (rows : List <Map <String , Any ?>>): List <String > {
120
120
val to = ArrayList <String >()
@@ -189,7 +189,7 @@ class Inspect {
189
189
* Return list of objects into an untyped Map
190
190
* @param objs target List
191
191
*/
192
- @JvmStatic inline fun <reified T > toListMap (objs : List <T >): List <Map <String , Any ?>> {
192
+ @JvmStatic fun <T > toListMap (objs : List <T >): List <Map <String , Any ?>> {
193
193
val gson = Gson ()
194
194
val json = gson.toJson(objs)
195
195
return gson.fromJson(json, object : TypeToken <List <Map <String , Any ?>>>() {}.type)
@@ -199,7 +199,7 @@ class Inspect {
199
199
* Return object into an untyped Map
200
200
* @param objs target object
201
201
*/
202
- @JvmStatic inline fun <reified T > toMap (obj : T ): Map <String , Any ?> {
202
+ @JvmStatic fun <T > toMap (obj : T ): Map <String , Any ?> {
203
203
val gson = Gson ()
204
204
val json = gson.toJson(obj)
205
205
return gson.fromJson(json, object : TypeToken <Map <String , Any ?>>() {}.type)
0 commit comments