Package org.more

Examples of org.more.RepeateException


        //2.排错
        Set<Class<?>> cacheSet = apiBinder.findClass(Creator.class);
        if (cacheSet == null || cacheSet.isEmpty())
            return;
        if (cacheSet.size() > 1)
            throw new RepeateException(Hasor.formatString("repeat CacheCreator at: %s.", cacheSet));
        Class<?> cacheCreator = cacheSet.iterator().next();
        if (CacheCreator.class.isAssignableFrom(cacheCreator) == false)
            throw new ClassCastException("cannot be cast to " + CacheCreator.class.getName());
        //2.注册服务
        apiBinder.bindType(CacheCreator.class, (Class<CacheCreator>) cacheCreator).asEagerSingleton();
View Full Code Here


                //
                //1.负责检查重复的匿名绑定
                if (anonymityTypes.contains(nowType) == true && this.ifAnonymity(e) == true) {
                    Class<?> type = e.getSourceType();
                    type = (type == null) ? e.getBindType() : type;
                    throw new RepeateException(String.format("repeate anonymity bind , type is %s", type));
                }
                if (anonymityTypes.contains(nowType) == false) {
                    anonymityTypes.add(nowType);
                }
                //
                //2.同类型绑定的重名检查
                String name = e.getBindName();
                if (nowSet.contains(name) == true) {
                    throw new RepeateException(String.format("repeate name bind ,name = %s. type is %s", name, nowType));
                }
                nowSet.add(name);
                //
                //3.ID
                this.idDataSource.put(e.getBindID(), e);
View Full Code Here

        ArrayList<XmlParserHook> arrayList = this.hooks.get(xpath);
        if (arrayList == null) {
            arrayList = new ArrayList<XmlParserHook>();
        }
        if (arrayList.contains(hook) == true) {
            throw new RepeateException(xpath + ":路径上重复绑定同一个XmlParserHook。");
        }
        arrayList.add(hook);
        this.hooks.put(xpath, arrayList);
    };
View Full Code Here

            list = this.regeditXmlParserKit.get(namespace);
        } else {
            list = new ArrayList<XmlNamespaceParser>();
        }
        if (list.contains(kit) == true) {
            throw new RepeateException("命名空间[" + namespace + "]与解析器" + kit + "重复注册。");
        }
        list.add(kit);
        this.regeditXmlParserKit.put(namespace, list);
    }
View Full Code Here

TOP

Related Classes of org.more.RepeateException

Copyright © 2018 www.massapicom. 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.