public T getExtInstance(Class[] argTypes, Object[] args) {
        if (clazz != null) {
            try {
                if (singleton) { // 如果是单例
                    if (instance == null) {
                        synchronized (this) {
                            if (instance == null) {
                                instance = ClassUtils.newInstanceWithArgs(clazz, argTypes, args);
                            }
                        }
                    }
                    return instance; // 保留单例
                } else {
                    return ClassUtils.newInstanceWithArgs(clazz, argTypes, args);
                }
            } catch (Exception e) {
                throw new SofaRpcRuntimeException("create " + clazz.getCanonicalName() + " instance error", e);
            }
        }
        throw new SofaRpcRuntimeException("Class of ExtensionClass is null");
    }
public T getExtInstance ( Class [ ] argTypes , Object [ ] args ) { if ( clazz != null ) { try { if ( singleton ) { if ( instance == null ) { synchronized ( this ) { if ( instance == null ) { instance = ClassUtils . newInstanceWithArgs ( clazz , argTypes , args ) ; } } } return instance ; } else { return ClassUtils . newInstanceWithArgs ( clazz , argTypes , args ) ; } } catch ( Exception e ) { throw new SofaRpcRuntimeException ( "create " + clazz . getCanonicalName ( ) + " instance error" , e ) ; } } throw new SofaRpcRuntimeException ( "Class of ExtensionClass is null" ) ; }
得到服务端实例对象，如果是单例则返回单例对象，如果不是则返回新创建的实例对象

@param argTypes 构造函数参数类型
@param args     构造函数参数值
@return 扩展点对象实例 ext instance