java - How to create class instance without using variable value? -


i developer , developing java application. application generated number reports , it's application updated regularly implementing new report feature in application.

so want integrate plugins system eclipse or others tools in can install new plugins according our requirement.

there questions have in mind implement -

q. 1 - how create class instance without using variable value ?

 example -   public class {   public static void main(string arg[])      {            int data = 0;            string cname = "b";            b ob1 = new b()  //valid ways           data = ob1.addmy();  //valid ways             cname ob2 = new cname();  // required ways            data = ob2.addmy(); // required ways                  } } class b      {       int addmy()          {            int =90;            return a;          }       } 

actually .class saved in packages dynamically saving class name in database after want use class name string create instance(object) accessing saved class members. please give me suggestion if possible

q. 2 - how best ways implement plugin features in java application. please give me example if possible .

please me all.

for

q. 1 - how create class instance without using variable value ?

you can have on these:

apache commons jci's

  1. reloadingclassloader
  2. filesystemalterationmonitor

below links might useful:

  1. https://commons.apache.org/proper/commons-jci/apidocs/org/apache/commons/jci/reloadingclassloader.html

  2. apache commons jci reloadingclassloader


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -