I have a singleton object like:
Object o = new Object () {
public void test() {
//...
}
};
But I cannot use o.test()
because the class/interface does not have that method. Is there any way to achieve this using meta programming such as getMethods
? Please do not suggest declaring an interface.
Aucun commentaire:
Enregistrer un commentaire