Examples of PointcutFactory


Examples of de.petris.dynamicaspects.PointcutFactory

//       "public .* doIt.*" );
    
     a.installAroundExecution(
//            Reflection.getInnerClassOf( "SimpleInner", SimpleTarget.class ),
            SimpleTarget.class,
       new PointcutFactory().addMethodName( "doIt" ).
//       addParamTypeList(
//                    double.class, int.class,    long.class, boolean[].class ).
           addParamTypeList(
                    double.class, ArrayList.class).
                getPattern() );
View Full Code Here

Examples of de.petris.dynamicaspects.PointcutFactory

//     SimpleTarget s = new SimpleTarget();
//        System.out.println( "annotation present: "
//                + SimpleTarget.class.isAnnotationPresent( OnLoadMixIn.class ) );
//       MyCallAspect a = new MyCallAspect();
     PointcutFactory factory = new PointcutFactory();
       
    factory.
            addModifierList( Modifier.PUBLIC ).
            addModifierList( Modifier.PRIVATE ).
            addReturnType( long.class ).
//            addDeclaringClass( SimpleTarget.class ).
            addMethodName( "doIt" ).
            addParamTypeList( new Class[] { double.class, int.class, long.class, boolean[].class } ).
            addParamTypeList( new Class[] { double.class, ArrayList.class } );
   
        AspectAgent.install(
                SimpleTarget.class.getPackage(),
                MyCallAspect.class, factory.getPattern(), WeaveType.CALL );

//        a.installAroundCall( SimpleTarget.class, factory.getPattern() );
    
        SimpleTarget s = new SimpleTarget();
        s.catchMe( "arg1" );
View Full Code Here

Examples of de.petris.dynamicaspects.PointcutFactory

       
        DefaultBeforeAfterAdvice a = new PrintoutAspect();
        List<CFlowCondition> l = new ArrayList<CFlowCondition>();
       
        l.add( new CFlowCondition( new Class[] { SimpleTarget.class },
                new PointcutFactory().addMethodName("doIt").addParamTypeList(
                        double.class, ArrayList.class ).getPattern(), true ) );
       
        a.install(
            Reflection.getInnerClassOf( "SimpleInner", SimpleTarget.class ),
            new PointcutFactory().addMethodName( "doIt" ).getPattern(),
            new CFlow( WeaveType.EXECUTION, l ) );
           
        SimpleTarget t = new SimpleTarget();
        t.catchMe( "i am the argument" );
           
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.