mardi 25 août 2015

Abstract callback in reflection method of java

I have a class in jar of which I want to invoke a method. But that method has parameter of abstract class and that abstract class is inner method of class in jar. Here is code:

   public abstract class A{

        private invokeThisMethod(AbstractClassA object){
        }

        private abstract class AbstractClassA {
              public void update(int remaining){}
        }
   }



public class myClass{

     //using Reflection get object of class A
      objectOfClassAusingReflection.inovke("invokeThisMethod", params)
}

Problem here is how do I create concrete implementation of AbstractClassA to pass in invoke method and get update method callbacks ?





Aucun commentaire:

Enregistrer un commentaire