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

  • 相关阅读:
    UI自动化测试框架
    Pyse( selenium-api的二次封装)
    Selenium之webdriverAPI
    selenium 基础之定位方式
    html综合应用
    html基础之js操作
    html基础之Dom操作
    (九)Locust 参数化
    (八)Locust 设置断言
    (七)Locust 的类和方法
  • 原文地址:https://www.cnblogs.com/kevinge/p/1440423.html
Copyright © 2011-2022 走看看