gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-16 04:18:40 25 4
gpt4 key购买 nike

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

YMP.registerHandler介绍

[英]注册自定义注解类处理器,重复注册将覆盖前者
[中]注册自定义注解类处理器,重复注册将覆盖前者

代码示例

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

public void registerHandler(Class<? extends Annotation> annoClass) {
  registerHandler(annoClass, IBeanHandler.DEFAULT_HANDLER);
}

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

@Override
public void init(YMP owner) throws Exception {
  if (!__inited) {
    //
    _LOG.info("Initializing ymate-platform-validation-" + VERSION);
    //
    __owner = owner;
    __validators = new HashMap<Class<? extends Annotation>, Class<? extends IValidator>>();
    __VALIDATION_META_CACHES = new HashMap<Class<?>, ValidationMeta>();
    __owner.registerHandler(Validator.class, new ValidateHandler(this));
    //
    __inited = true;
  }
}

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

__moduleCfg = new DefaultConfigModuleCfg(__owner);
__owner.registerHandler(Configuration.class, new ConfigHandler(this));

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

@Override
public void init(YMP owner) throws Exception {
  if (!__inited) {
    //
    _LOG.info("Initializing ymate-platform-persistence-jdbc-" + VERSION);
    //
    __owner = owner;
    __moduleCfg = new DefaultDatabaseModuleCfg(owner);
    //
    __owner.getEvents().registerEvent(DatabaseEvent.class);
    __owner.registerHandler(Repository.class, new RepoHandler(this));
    //
    __dsCaches = new HashMap<String, IDataSourceAdapter>();
    for (DataSourceCfgMeta _meta : __moduleCfg.getDataSourceCfgs().values()) {
      IDataSourceAdapter _adapter = _meta.getAdapterClass().newInstance();
      _adapter.initialize(this, _meta);
      // 将数据源适配器添加到缓存
      __dsCaches.put(_meta.getName(), _adapter);
    }
    //
    __inited = true;
  }
}

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

@Override
public void init(YMP owner) throws Exception {
  if (!__inited) {
    //
    _LOG.info("Initializing ymate-platform-webmvc-" + VERSION);
    //
    __owner = owner;
    __moduleCfg = new DefaultWebMvcModuleCfg(owner);
    __owner.getEvents().registerEvent(WebEvent.class);
    __owner.registerHandler(Controller.class, new ControllerHandler(this));
    __owner.registerHandler(ExceptionProcessor.class, new ExceptionProcessorHandler());
    //
    if (__moduleCfg.getErrorProcessor() instanceof IWebInitializable) {
      ((IWebInitializable) __moduleCfg.getErrorProcessor()).init(this);
    }
    if (__moduleCfg.isConventionInterceptorMode()) {
      __interceptorRuleProcessor = new DefaultInterceptorRuleProcessor();
      __interceptorRuleProcessor.init(this);
      __owner.registerHandler(InterceptorRule.class, new InterceptorRuleHandler(this));
    }
    //
    __inited = true;
  }
}

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

@Override
public void init(YMP owner) throws Exception {
  if (!__inited) {
    //
    _LOG.info("Initializing ymate-platform-serv-" + VERSION);
    //
    __owner = owner;
    __moduleCfg = new DefaultServModuleCfg(owner);
    //
    __owner.registerExcludedClass(IServer.class);
    __owner.registerExcludedClass(IServerCfg.class);
    __owner.registerExcludedClass(IClient.class);
    __owner.registerExcludedClass(IClientCfg.class);
    __owner.registerExcludedClass(ICodec.class);
    __owner.registerExcludedClass(IListener.class);
    //
    __owner.registerHandler(Server.class, new ServerHandler(this));
    __owner.registerHandler(Client.class, new ClientHandler(this));
    //
    __inited = true;
  }
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com