Created
February 23, 2021 11:34
-
-
Save itang/e33f2722732f92d2465ff1d7e8bed240 to your computer and use it in GitHub Desktop.
This file contains 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
private def print_type_tree(clazz: Class[?], level: Int = 0): Unit = | |
if clazz != null then | |
println((" " * level) + clazz) | |
val nextLevel = level + 2 | |
clazz.getInterfaces.foreach(it => print_type_tree(it, nextLevel)) | |
print_type_tree(clazz.getSuperclass, nextLevel) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment