json - JAVA Reflection - JoinPoint -
i'm trying use java reflection details execution , save in gray log.
gray log methods accept join point parameters, can't information, i'd information cast json, can how ?
this i've tried:
methodsignature signature = (methodsignature) joinpoint.getsignature(); object[] args = joinpoint.getargs(); (object : args) { if (a.getclass().tostring().tolowercase().contains("request")) { method[] methods = a.getclass().getmethods(); (method m : methods){ if (m.getname().substring(0, 3).tolowercase().equals("get")) { object result = m.invoke(a); jarray = new jsonarray(); jobject = new jsonobject(); if (result instanceof list<?>) { ... } } } } }
this implies have test instanceof same result, want info , parse json.
Comments
Post a Comment