Created
March 10, 2021 08:09
-
-
Save mariusoe/37eb4b51b353200e21efa8d9ff9b4208 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inspectit: | |
instrumentation: | |
actions: | |
'a_get_class_information': | |
imports: | |
- 'java.lang.StringBuffer' | |
- 'java.lang.reflect.Method' | |
- 'java.lang.reflect.Field' | |
input: | |
_arg1: Object | |
value-body: | | |
StringBuffer sb = new StringBuffer(); | |
Class clazz = _arg1.getClass(); | |
Method[] methods = clazz.getMethods(); | |
for (int i=0; i<methods.length; i++) { | |
sb.append(methods[i].toGenericString()); | |
sb.append("\n"); | |
} | |
sb.append("####\n"); | |
Field[] fields = clazz.getDeclaredFields(); | |
for (int i=0; i<fields.length; i++) { | |
sb.append(fields[i].toGenericString()); | |
sb.append("\n"); | |
} | |
return sb.toString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment