Package org.codehaus.aspectwerkz.attribdef

Examples of org.codehaus.aspectwerkz.attribdef.AttribDefSystem


        if (!m_initialized) {
            loadAdvices();
        }
        // TODO: handle a list of systems that nees to be matched to the advice lists (loadAdvices etc.)
        if (m_system.isAttribDef()) {
            AttribDefSystem system = (AttribDefSystem)m_system;
            for (int i = 0, j = m_preAdvices.length; i < j; i++) {
                try {
                    IndexTuple index = m_preAdvices[i];
                    int aspectIndex = index.getAspectIndex();
                    int methodIndex = index.getMethodIndex();
                    system.getAspect(aspectIndex).___AW_invokeAdvice(methodIndex, this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
        }
        else {
            XmlDefSystem system = (XmlDefSystem)m_system;
            for (int i = 0, j = m_preAdvices.length; i < j; i++) {
                try {
                    system.getAdvice(m_preAdvices[i]).doExecute(this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
View Full Code Here


        if (!m_initialized) {
            loadAdvices();
        }
        // TODO: handle a list of systems that nees to be matched to the advice lists (loadAdvices etc.)
        if (m_system.isAttribDef()) {
            AttribDefSystem system = (AttribDefSystem)m_system;
            for (int i = m_postAdvices.length - 1; i >= 0; i--) {
                try {
                    IndexTuple index = m_postAdvices[i];
                    int aspectIndex = index.getAspectIndex();
                    int methodIndex = index.getMethodIndex();
                    system.getAspect(aspectIndex).___AW_invokeAdvice(methodIndex, this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
        }
        else {
            XmlDefSystem system = (XmlDefSystem)m_system;
            for (int i = m_postAdvices.length - 1; i >= 0; i--) {
                try {
                    system.getAdvice(m_postAdvices[i]).doExecute(this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
View Full Code Here

        if (m_currentAdviceIndex != m_adviceIndexes.length) {
            try {
                // TODO: handle a list of systems that nees to be matched to the advice lists (loadAdvices etc.)
                if (m_system.isAttribDef()) {
                    AttribDefSystem system = (AttribDefSystem)m_system;

                    IndexTuple index = m_adviceIndexes[m_currentAdviceIndex];
                    int aspectIndex = index.getAspectIndex();
                    int methodIndex = index.getMethodIndex();
                    result = system.getAspect(aspectIndex).___AW_invokeAdvice(methodIndex, this);
                }
                else {
                    XmlDefSystem system = (XmlDefSystem)m_system;

                    result = system.getAdvice(m_adviceIndexes[m_currentAdviceIndex]).doExecute(this);
                }
            }
            catch (ArrayIndexOutOfBoundsException ex) {
                StringBuffer cause = new StringBuffer();
                cause.append("advices for ");
View Full Code Here

        if (!m_initialized) {
            loadAdvices();
        }
        // TODO: handle a list of systems that nees to be matched to the advice lists (loadAdvices etc.)
        if (m_system.isAttribDef()) {
            AttribDefSystem system = (AttribDefSystem)m_system;
            for (int i = 0, j = m_preAdvices.length; i < j; i++) {
                try {
                    IndexTuple index = m_preAdvices[i];
                    int aspectIndex = index.getAspectIndex();
                    int methodIndex = index.getMethodIndex();
                    system.getAspect(aspectIndex).___AW_invokeAdvice(methodIndex, this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
        }
        else {
            XmlDefSystem system = (XmlDefSystem)m_system;
            for (int i = 0, j = m_preAdvices.length; i < j; i++) {
                try {
                    system.getAdvice(m_preAdvices[i]).doExecute(this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
View Full Code Here

        if (!m_initialized) {
            loadAdvices();
        }
        // TODO: handle a list of systems that nees to be matched to the advice lists (loadAdvices etc.)
        if (m_system.isAttribDef()) {
            AttribDefSystem system = (AttribDefSystem)m_system;
            for (int i = m_postAdvices.length - 1; i >= 0; i--) {
                try {
                    IndexTuple index = m_postAdvices[i];
                    int aspectIndex = index.getAspectIndex();
                    int methodIndex = index.getMethodIndex();
                    system.getAspect(aspectIndex).___AW_invokeAdvice(methodIndex, this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
        }
        else {
            XmlDefSystem system = (XmlDefSystem)m_system;
            for (int i = m_postAdvices.length - 1; i >= 0; i--) {
                try {
                    system.getAdvice(m_postAdvices[i]).doExecute(this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
View Full Code Here

            cAdvices = new ArrayList();
        }

        // TODO: joinPoint.getSystem() should return a LIST with systems, how-to handle that?
        if (joinPoint.getSystem().isAttribDef()) {
            AttribDefSystem system = (AttribDefSystem)joinPoint.getSystem();

            // TODO: handle attribdef model
        }
        else {
            XmlDefSystem system = (XmlDefSystem)joinPoint.getSystem();
            for (int i = 0; i < joinPoint.getPointcuts().length; i++) {
                for (int j = 0; j < joinPoint.getPointcuts()[i].getAdviceIndexes().length; j++) {
                    cAdvices.add(system.getAdvice(
                            joinPoint.getPointcuts()[i].getAdviceIndex(j)
                    ));
                }
            }
        }
View Full Code Here

                               boolean purge) {
        int iFound = 0;

        // TODO: joinPoint.getSystem() should return a LIST with systems, how-to handle that?
        if (joinPoint.getSystem().isAttribDef()) {
            AttribDefSystem system = (AttribDefSystem)joinPoint.getSystem();

            // TODO: handle attribdef model
        }
        else {
            XmlDefSystem system = (XmlDefSystem)joinPoint.getSystem();

            for (int i = 0; i < joinPoint.getPointcuts().length; i++) {
                for (int j = 0; j < joinPoint.getPointcuts()[i].getAdviceIndexes().length; j++) {
                    if (system.getAdvice(joinPoint.getPointcuts()[i].
                            getAdviceIndex(j)).getName().equals(adviceName)) {
                        iFound++;
                        if (iFound > 1) {
                            removeAdvice(adviceName, joinPoint, joinPoint.getPointcuts()[i]);
                        }
View Full Code Here

            try {
                m_currentAdviceIndex++;

                // TODO: joinPoint.getSystem() should return a LIST with systems, how-to handle that?
                if (joinPoint.getSystem().isAttribDef()) {
                    AttribDefSystem system = (AttribDefSystem)joinPoint.getSystem();

                    ExecutionPointcut methodPointcut = joinPoint.getPointcuts()[m_currentPointcutIndex];
                    IndexTuple index = methodPointcut.getAdviceIndex(m_currentAdviceIndex);
                    int aspectIndex = index.getAspectIndex();
                    int methodIndex = index.getMethodIndex();
                    result = system.getAspect(aspectIndex).___AW_invokeAdvice(methodIndex, joinPoint);
                }
                else {
                    XmlDefSystem system = (XmlDefSystem)joinPoint.getSystem();

                    IndexTuple index = joinPoint.getPointcuts()[m_currentPointcutIndex].
                            getAdviceIndex(m_currentAdviceIndex);
                    result = system.getAdvice(index).doExecute(joinPoint);
                }

                m_currentAdviceIndex--;
            }
            catch (ArrayIndexOutOfBoundsException ex) {
View Full Code Here

        if (!m_initialized) {
            loadAdvices();
        }
        // TODO: handle a list of systems that nees to be matched to the advice lists (loadAdvices etc.)
        if (m_system.isAttribDef()) {
            AttribDefSystem system = (AttribDefSystem)m_system;
            for (int i = 0, j = m_preAdvices.length; i < j; i++) {
                try {
                    IndexTuple index = m_preAdvices[i];
                    int aspectIndex = index.getAspectIndex();
                    int methodIndex = index.getMethodIndex();
                    system.getAspect(aspectIndex).___AW_invokeAdvice(methodIndex, this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
        }
        else {
            XmlDefSystem system = (XmlDefSystem)m_system;
            for (int i = 0, j = m_preAdvices.length; i < j; i++) {
                try {
                    system.getAdvice(m_preAdvices[i]).doExecute(this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
View Full Code Here

        if (!m_initialized) {
            loadAdvices();
        }
        // TODO: handle a list of systems that nees to be matched to the advice lists (loadAdvices etc.)
        if (m_system.isAttribDef()) {
            AttribDefSystem system = (AttribDefSystem)m_system;
            for (int i = m_postAdvices.length - 1; i >= 0; i--) {
                try {
                    IndexTuple index = m_postAdvices[i];
                    int aspectIndex = index.getAspectIndex();
                    int methodIndex = index.getMethodIndex();
                    system.getAspect(aspectIndex).___AW_invokeAdvice(methodIndex, this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
        }
        else {
            XmlDefSystem system = (XmlDefSystem)m_system;
            for (int i = m_postAdvices.length - 1; i >= 0; i--) {
                try {
                    system.getAdvice(m_postAdvices[i]).doExecute(this);
                }
                catch (ArrayIndexOutOfBoundsException ex) {
                    throw new RuntimeException(createAdvicesNotCorrectlyMappedMessage());
                }
            }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.attribdef.AttribDefSystem

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.