Package org.more.classcode.aop

Examples of org.more.classcode.aop.AopClassConfig


            return this.getDefaultInstance(bindInfo.getBindType());
        }
        //3.Build 对象。
        HasorBindInfoProviderAdapter<T> infoAdapter = (HasorBindInfoProviderAdapter<T>) bindInfo;
        try {
            AopClassConfig cc = infoAdapter.buildEngine(this.aopList);
            Class<?> newType = null;
            if (cc.hasChange() == true) {
                newType = cc.toClass();
            } else {
                newType = cc.getSuperClass();
            }
            return (T) createObject((Class<T>) newType, infoAdapter);
        } catch (Exception e) {
            throw ExceptionUtils.toRuntimeException(e);
        }
View Full Code Here


        /**获取用于创建Bean的 Engine。*/
        public AopClassConfig buildEngine(List<AopMatcherMethodInterceptor> aopList) {
            if (this.engine == null) {
                Class<?> superType = this.getSourceType();
                superType = (superType == null) ? this.getBindType() : superType;
                this.engine = new AopClassConfig(superType, this.masterLosder);
                for (AopMatcherMethodInterceptor aop : aopList) {
                    if (aop.getMatcherClass().matches(superType) == false) {
                        continue;
                    }
                    AopMatcher aopMatcher = new HasorAopMatcher(aop.getMatcherMethod());
View Full Code Here

        fos.flush();
        fos.close();
    }
    //
    public static void main(String[] args) throws Exception {
        AopClassConfig aCC = new AopClassConfig(Bean.class);
        aCC.addAopInterceptor(new TestAopInterceptor());
        //
        PropertyClassConfig pCC = new PropertyClassConfig(aCC.toClass());
        pCC.addProperty("name", new TestSimplePropertyDelegate(String.class));
        //
        MethodClassConfig mCC = new MethodClassConfig(pCC.toClass());
        mCC.addDelegate(List.class, new DefaultMethodDelegate());
        //
View Full Code Here

TOP

Related Classes of org.more.classcode.aop.AopClassConfig

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.