jeudi 10 décembre 2015

How do you retrieve a Method object given its name and the type of its formal parameters?

Given

class Foo {
    public static void aa() {}
    public static void bb(String x) {}
}

The call:

Foo.class.getMethod("aa")

will return a reference to aa.

What incantation is necessary to get a reference to bb?





Aucun commentaire:

Enregistrer un commentaire