Package org.codehaus.aspectwerkz.regexp

Examples of org.codehaus.aspectwerkz.regexp.PointcutPatternTuple


                                             final ClassMetaData classMetaData,
                                             final MethodMetaData methodMetaData) {
        for (Iterator it = m_throwsPointcutPatterns.entrySet().iterator(); it.hasNext();) {
            Map.Entry entry = (Map.Entry)it.next();
            String name = (String)entry.getKey();
            PointcutPatternTuple pointcutPattern = (PointcutPatternTuple)entry.getValue();

            // try to find a match somewhere in the class hierarchy (interface or super class)
            if (pointcutPattern.isHierarchical()) {
                jexlContext.getVars().put(name, Boolean.FALSE);
                ThrowsPointcut.matchThrowsPointcutSuperClasses(
                        jexlContext, name, classMetaData, methodMetaData, pointcutPattern);
            }
            // match the single class only
            else if (pointcutPattern.getClassPattern().matches(classMetaData.getName()) &&
                    ((ThrowsPattern)pointcutPattern.getPattern()).matches(methodMetaData)) {
                jexlContext.getVars().put(name, Boolean.TRUE);
            }
            else {
                jexlContext.getVars().put(name, Boolean.FALSE);
            }
View Full Code Here


                                                 final ClassMetaData classMetaData,
                                                 final MethodMetaData methodMetaData) {
        for (Iterator it = m_callerSidePointcutPatterns.entrySet().iterator(); it.hasNext();) {
            Map.Entry entry = (Map.Entry)it.next();
            String name = (String)entry.getKey();
            PointcutPatternTuple pointcutPattern = (PointcutPatternTuple)entry.getValue();

            if (pointcutPattern.isHierarchical()) {
                jexlContext.getVars().put(name, Boolean.FALSE);
                CallerSidePointcut.matchCallerSidePointcutSuperClasses(
                        jexlContext, name, classMetaData, methodMetaData, pointcutPattern);
            }
            // match the single class only
            else if (((CallerSidePattern)pointcutPattern.getPattern()).
                    matches(classMetaData.getName(), methodMetaData)) {
                jexlContext.getVars().put(name, Boolean.TRUE);
            }
            else {
                jexlContext.getVars().put(name, Boolean.FALSE);
View Full Code Here

     *
     * @param pointcut the pointcut definition
     */
    public void addMethodPointcutPattern(final PointcutDefinition pointcut) {
        m_methodPointcutPatterns.put(pointcut.getName(),
                new PointcutPatternTuple(
                        pointcut.getRegexpClassPattern(),
                        pointcut.getRegexpPattern(),
                        pointcut.isHierarchical()));
    }
View Full Code Here

                                       final ClassMetaData classMetaData,
                                       final MethodMetaData methodMetaData) {
        for (Iterator it = m_methodPointcutPatterns.entrySet().iterator(); it.hasNext();) {
            Map.Entry entry = (Map.Entry)it.next();
            String name = (String)entry.getKey();
            PointcutPatternTuple pointcutPattern = (PointcutPatternTuple)entry.getValue();

            // try to find a match somewhere in the class hierarchy (interface or super class)
            if (pointcutPattern.isHierarchical()) {
                jexlContext.getVars().put(name, Boolean.FALSE);
                matchMethodPointcutSuperClasses(
                        jexlContext, name, classMetaData, methodMetaData, pointcutPattern);
            }
            // match the class only
            else if (pointcutPattern.getClassPattern().matches(classMetaData.getName()) &&
                    ((MethodPattern)pointcutPattern.getPattern()).matches(methodMetaData)) {
                jexlContext.getVars().put(name, Boolean.TRUE);
            }
            else {
                jexlContext.getVars().put(name, Boolean.FALSE);
            }
View Full Code Here

        // check for cflow pointcut dependencies
        if (joinPoint.getCFlowPointcuts().size() != 0) {
            // we must check if we are in the correct control flow
            boolean isInCFlow = false;
            for (Iterator it = joinPoint.getCFlowPointcuts().iterator(); it.hasNext();) {
                PointcutPatternTuple patternTuple = (PointcutPatternTuple)it.next();
                if (joinPoint.getSystem().isInControlFlowOf(patternTuple)) {
                    isInCFlow = true;
                    break;
                }
            }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.regexp.PointcutPatternTuple

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.