jeudi 5 septembre 2019

Can we create instance objects using javassist without using reflection?

How can I create instance objects using javassist without using reflection API?

Class cls = Class.forName("className");
Object obj = cls.getConstructor().newInstance();

CtClass ctClass = cp.get("className");

How can I get the instance of ctClass without using reflection API.





Aucun commentaire:

Enregistrer un commentaire