vendredi 13 novembre 2015

In scala, how to find invocation of subroutines defined in a function

Assuming that I have a function/method:

class A {

def function() = {
   subroutine("A")
   ...
   subroutine("B")
   ...
   subroutine("C")
}

def subroutine(a: String) = { ... }

}

Is it possible to use Scala reflective programming to find all 3 invocations of subroutine(a: String) in function(), without calling function() itself? (Which will potentially take a long process)





Aucun commentaire:

Enregistrer un commentaire