temporarily switching from Scala reflection to Java reflection