Examples of IocBean


Examples of org.nutz.ioc.loader.annotation.IocBean

  public static void evalModule(ActionInfo ai, Class<?> type) {
    ai.setModuleType(type);
    String beanName = null;
    // 按照5.10.3章节的说明,优先使用IocBean.name的注解声明bean的名字 Modify By QinerG@gmai.com
    InjectName innm = type.getAnnotation(InjectName.class);
    IocBean iocBean = type.getAnnotation(IocBean.class);
    if (innm == null && iocBean == null) // TODO 再考虑考虑
      return;
    if (iocBean != null) {
      beanName = iocBean.name();
    }
    if (Strings.isBlank(beanName)) {
      if (innm != null && !Strings.isBlank(innm.value())) {
        beanName = innm.value();
      } else {
View Full Code Here

Examples of org.nutz.ioc.loader.annotation.IocBean

    public <T> T get(Class<T> type) throws IocException {
        InjectName inm = type.getAnnotation(InjectName.class);
        if (null != inm && (!Strings.isBlank(inm.value())))
            return get(type, inm.value());
        IocBean iocBean = type.getAnnotation(IocBean.class);
        if (iocBean != null && (!Strings.isBlank(iocBean.name())))
          return get(type, iocBean.name());
        return get(type, Strings.lowerFirst(type.getSimpleName()));
    }
View Full Code Here

Examples of org.nutz.ioc.loader.annotation.IocBean

    public static void evalModule(ActionInfo ai, Class<?> type) {
        ai.setModuleType(type);
        String beanName = null;
        // 按照5.10.3章节的说明,优先使用IocBean.name的注解声明bean的名字 Modify By QinerG@gmai.com
        InjectName innm = type.getAnnotation(InjectName.class);
        IocBean iocBean = type.getAnnotation(IocBean.class);
        if (innm == null && iocBean == null) // TODO 再考虑考虑
            return;
        if (iocBean != null) {
            beanName = iocBean.name();
        }
        if (Strings.isBlank(beanName)) {
            if (innm != null && !Strings.isBlank(innm.value())) {
                beanName = innm.value();
            } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.