1. String name = "com.xxx.xxx.xxx"; // make sure this is right
2. Object o = Class.forName(name).getDeclaredConstructor(
       new Class[]{
         // depends on your construct parameter list
         // This is the example for xxx(Integer x, int y)
          Class.forName("java.lang.Integer"), 
          Integer.TYPE
       }).newInstance(
        new Object[]{
          new Integer("333333"),
          new Integer("22")});
3. if (o instance of com.xxx.xxx.xxx) {
     ((com.xxx.xxx.xxx)o).doSomething(...);
   }