zoukankan      html  css  js  c++  java
  • Class.forName Method invoke

            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;
            }

  • 相关阅读:
    第12组 Beta冲刺 (3/5)
    第12组 Beta冲刺 (2/5)
    第12组 Beta冲刺 (1/5)
    每周小结(1/3)
    第03组 Beta冲刺 (4/5)
    第03组 Beta冲刺 (3/5)
    第03组 Beta冲刺 (1/5)
    第03组 Alpha冲刺 总结
    第03组 Alpha冲刺 (6/6)
    第03组 Alpha冲刺 (4/6)
  • 原文地址:https://www.cnblogs.com/kevinge/p/1440423.html
Copyright © 2011-2022 走看看