net.ymate.platform.core.YMP.getBean()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(73)

本文整理了Java中net.ymate.platform.core.YMP.getBean()方法的一些代码示例,展示了YMP.getBean()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YMP.getBean()方法的具体详情如下:
包路径:net.ymate.platform.core.YMP
类名称:YMP
方法名:getBean

YMP.getBean介绍

暂无

代码示例

代码示例来源:origin: suninformation/ymate-platform-v2

private IInterceptor __doGetInterceptorInstance(YMP owner, Class<? extends IInterceptor> interceptClass) throws IllegalAccessException, InstantiationException {
  if (interceptClass.isAnnotationPresent(Interceptor.class)) {
    IInterceptor _instance = owner.getBean(interceptClass);
    if (_instance != null) {
      return _instance;
    }
  }
  return interceptClass.newInstance();
}

代码示例来源:origin: suninformation/ymate-platform-v2

private ValidateResult __doValidate(Annotation[] annotations, String paramName, String paramLabel, Map<String, Object> paramValues, Map<String, String> contextParams, String resourceName) {
  ValidateResult _result = null;
  for (Annotation _ann : annotations) {
    IValidator _validator = __owner.getBean(__validators.get(_ann.annotationType()));
    _result = _validator.validate(new ValidateContext(__owner, _ann, paramName, paramLabel, paramValues, contextParams, resourceName));
    if (_result != null) {
      break;
    }
  }
  return _result;
}

代码示例来源:origin: suninformation/ymate-platform-v2

@Override
  public Object doProxy(IProxyChain proxyChain) throws Throwable {
    if (ClassUtils.isInterfaceOf(proxyChain.getTargetClass(), IConfigurable.class)) {
      if ("getConfig".equals(proxyChain.getTargetMethod().getName())) {
        IConfiguration _config = (IConfiguration) proxyChain.doProxyChain();
        if (_config == null) {
          YMP _owner = proxyChain.getProxyFactory().getOwner();
          Configurable _annotation = proxyChain.getTargetClass().getAnnotation(Configurable.class);
          if (_annotation.type().equals(DefaultConfiguration.class)) {
            _config = _annotation.type().newInstance();
            Cfgs.get(_owner).fillCfg(_config, _annotation.value());
          } else {
            _config = _owner.getBean(_annotation.type());
            if (_config == null) {
              _config = _annotation.type().newInstance();
              Cfgs.get(_owner).fillCfg(_config);
            }
          }
          ((IConfigurable) proxyChain.getTargetObject()).setConfig(_config);
        }
        return _config;
      }
    }
    return proxyChain.doProxyChain();
  }
}

代码示例来源:origin: suninformation/ymate-platform-v2

WebContext.getContext().addAttribute(RequestParametersProxy.class.getName(), _paramValues);
Object _targetObj = __owner.getOwner().getBean(__requestMeta.getTargetClass());
Object _resultObj;
try {

相关文章