Class manager = null;

        try
        {
            manager = Class.forName(name);
        }
        catch (ClassNotFoundException e)
        {
            return;
        }

        Method oMethod = null;

        try
        {
            oMethod = manager.getMethod("getInstance", null);
        }
        catch (Exception e)
        {
            return;
        }

        IInitializable initializable = null;

        try
        {
            initializable = (IInitializable) oMethod.invoke(null, null);
        }
        catch (Exception e)
        {
            return;
        }

        try
        {
            initializable.init(xmlStatic);
        }
        catch (Throwable e)
        {
            return;
        }

相关文章:

  • 2021-05-19
  • 2022-02-06
  • 2021-10-12
  • 2021-11-23
  • 2022-12-23
  • 2021-10-16
  • 2021-12-18
  • 2021-12-04
猜你喜欢
  • 2021-12-15
  • 2021-05-22
  • 2021-09-16
  • 2022-01-29
  • 2021-05-24
  • 2021-05-31
  • 2021-12-13
相关资源
相似解决方案