Package org.codehaus.aspectwerkz

Examples of org.codehaus.aspectwerkz.NameIndexTuple


    public NameIndexTuple[] getPreAdviceIndexTuples() {
        synchronized (m_preIndexes) {
            synchronized (m_preNames) {
                final NameIndexTuple[] tuples = new NameIndexTuple[m_preNames.length];
                for (int i = 0; i < m_preNames.length; i++) {
                    tuples[i] = new NameIndexTuple(m_preNames[i], m_preIndexes[i]);
                }
                return tuples;
            }
        }
    }
View Full Code Here


    public NameIndexTuple[] getPostAdviceIndexTuples() {
        synchronized (m_postIndexes) {
            synchronized (m_postNames) {
                final NameIndexTuple[] tuples = new NameIndexTuple[m_postNames.length];
                for (int i = 0; i < m_postNames.length; i++) {
                    tuples[i] = new NameIndexTuple(m_postNames[i], m_postIndexes[i]);
                }
                return tuples;
            }
        }
    }
View Full Code Here

        methodMetaData.setExceptionTypes(new String[]{});

        List advices = ((ExecutionPointcut)SystemLoader.getSystem("tests").getAspectMetaData("DynamicDeploymentTest").
                getExecutionPointcuts(m_classMetaData, methodMetaData).get(0)).
                getAdviceIndexTuples();
        NameIndexTuple tuple1 = (NameIndexTuple)advices.get(0);
        NameIndexTuple tuple2 = (NameIndexTuple)advices.get(1);
        advices.set(0, tuple2);
        advices.set(1, tuple1);
        ((ExecutionPointcut)SystemLoader.getSystem("tests").getAspectMetaData("DynamicDeploymentTest").
                getExecutionPointcuts(m_classMetaData, methodMetaData).get(0)).
                setAdviceIndexTuples(advices);
View Full Code Here

        methodMetaData.setExceptionTypes(new String[]{});

        List advices = ((ExecutionPointcut)SystemLoader.getSystem("tests").getAspectMetaData("DynamicDeploymentTest").
                getExecutionPointcuts(m_classMetaData, methodMetaData).get(0)).
                getAdviceIndexTuples();
        NameIndexTuple adviceTuple0 = (NameIndexTuple)advices.remove(0);
        ((ExecutionPointcut)SystemLoader.getSystem("tests").getAspectMetaData("DynamicDeploymentTest").
                getExecutionPointcuts(m_classMetaData, methodMetaData).get(0)).
                setAdviceIndexTuples(advices);

        m_logString = "";
View Full Code Here

                getAspectMetaData(ASPECT_NAME).
                getExecutionPointcut("pc1");

        // get the advices
        List advices = pointcut.getAdviceIndexTuples();
        NameIndexTuple tuple1 = (NameIndexTuple)advices.get(0);
        NameIndexTuple tuple2 = (NameIndexTuple)advices.get(1);

        // reorder the advices
        advices.set(0, tuple2);
        advices.set(1, tuple1);
View Full Code Here

                getAspectMetaData(ASPECT_NAME).
                getExecutionPointcuts(m_classMetaData, methodMetaData).get(0);

        List advices = methodPointcut.getAdviceIndexTuples();

        NameIndexTuple adviceTuple = (NameIndexTuple)advices.remove(0);
        methodPointcut.setAdviceIndexTuples(advices);

        m_logString = "";
        removeAdviceTestMethod();
        assertEquals("before2 invocation after2 ", m_logString);
View Full Code Here

        Pointcut pointcut = SystemLoader.getSystem(this.getClass()).getAspectManager("tests")
                .getPointcutManager(ASPECT_NAME).getPointcut("pc1 || pc2 || pc3");

        // get the advices
        List advices = pointcut.getAroundAdviceIndexTuples();
        NameIndexTuple tuple1 = (NameIndexTuple)advices.get(0);
        NameIndexTuple tuple2 = (NameIndexTuple)advices.get(1);

        // reorder the advices
        advices.set(0, tuple2);
        advices.set(1, tuple1);
View Full Code Here

                                PointcutType.EXECUTION,
                                methodMetaData, null
                        )
                ).get(0);
        List advices = methodPointcut.getAroundAdviceIndexTuples();
        NameIndexTuple adviceTuple = (NameIndexTuple)advices.remove(0);
        methodPointcut.setAroundAdviceIndexTuples(advices);
        m_logString = "";
        removeAdviceTestMethod();
        assertEquals("before2 invocation after2 ", m_logString);
View Full Code Here

    public List getAroundAdviceIndexTuples() {
        synchronized (m_aroundAdviceIndexes) {
            synchronized (m_aroundAdviceNames) {
                final List advices = new ArrayList(m_aroundAdviceNames.length);
                for (int i = 0; i < m_aroundAdviceNames.length; i++) {
                    advices.add(new NameIndexTuple(m_aroundAdviceNames[i], m_aroundAdviceIndexes[i]));
                }
                return advices;
            }
        }
    }
View Full Code Here

    public List getBeforeAdviceIndexTuples() {
        synchronized (m_beforeAdviceIndexes) {
            synchronized (m_beforeAdviceNames) {
                final List advices = new ArrayList(m_beforeAdviceNames.length);
                for (int i = 0; i < m_beforeAdviceNames.length; i++) {
                    advices.add(new NameIndexTuple(m_beforeAdviceNames[i], m_beforeAdviceIndexes[i]));
                }
                return advices;
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.NameIndexTuple

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.