Package org.codehaus.aspectwerkz.regexp

Examples of org.codehaus.aspectwerkz.regexp.PointcutPatternTuple


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


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

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

    public boolean matchMethodPointcut(final ClassMetaData classMetaData) {
        try {
            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()) {
                    if (MethodPointcut.matchMethodPointcutSuperClasses(
                            name, classMetaData, pointcutPattern)) {
                        return true;
                    }
                }
                // match the single class only
                else if (pointcutPattern.getClassPattern().matches(classMetaData.getName())) {
                    return true;
                }
            }
            return false;
        }
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);
                MethodPointcut.matchMethodPointcutSuperClasses(
                        jexlContext, name, classMetaData, methodMetaData, pointcutPattern);
            }
            // match the single 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

    private void matchSetFieldPointcutPatterns(final JexlContext jexlContext,
                                               final ClassMetaData classMetaData) {
        for (Iterator it = m_setFieldPointcutPatterns.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);
                FieldPointcut.matchFieldPointcutSuperClasses(
                        jexlContext, name, classMetaData, pointcutPattern);
            }
            // match the single class only
            else if (pointcutPattern.getClassPattern().matches(classMetaData.getName())) {
                jexlContext.getVars().put(name, Boolean.TRUE);
            }
            else {
                jexlContext.getVars().put(name, Boolean.FALSE);
            }
View Full Code Here

                                               final ClassMetaData classMetaData,
                                               final FieldMetaData fieldMetaData) {
        for (Iterator it = m_setFieldPointcutPatterns.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);
                FieldPointcut.matchFieldPointcutSuperClasses(
                        jexlContext, name, classMetaData, fieldMetaData, pointcutPattern);
            }
            // match the single class only
            else if (pointcutPattern.getClassPattern().matches(classMetaData.getName()) &&
                    ((FieldPattern)pointcutPattern.getPattern()).matches(fieldMetaData)) {
                jexlContext.getVars().put(name, Boolean.TRUE);
            }
            else {
                jexlContext.getVars().put(name, Boolean.FALSE);
            }
View Full Code Here

    private void matchGetFieldPointcutPatterns(final JexlContext jexlContext,
                                               final ClassMetaData classMetaData) {
        for (Iterator it = m_getFieldPointcutPatterns.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);
                FieldPointcut.matchFieldPointcutSuperClasses(
                        jexlContext, name, classMetaData, pointcutPattern);
            }
            // match the single class only
            else if (pointcutPattern.getClassPattern().matches(classMetaData.getName())) {
                jexlContext.getVars().put(name, Boolean.TRUE);
            }
            else {
                jexlContext.getVars().put(name, Boolean.FALSE);
            }
View Full Code Here

                                               final ClassMetaData classMetaData,
                                               final FieldMetaData fieldMetaData) {
        for (Iterator it = m_getFieldPointcutPatterns.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);
                FieldPointcut.matchFieldPointcutSuperClasses(
                        jexlContext, name, classMetaData, fieldMetaData, pointcutPattern);
            }
            // match the single class only
            else if (pointcutPattern.getClassPattern().matches(classMetaData.getName()) &&
                    ((FieldPattern)pointcutPattern.getPattern()).matches(fieldMetaData)) {
                jexlContext.getVars().put(name, Boolean.TRUE);
            }
            else {
                jexlContext.getVars().put(name, Boolean.FALSE);
            }
View Full Code Here

    private void matchThrowsPointcutPatterns(final JexlContext jexlContext,
                                             final ClassMetaData classMetaData) {
        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, pointcutPattern);
            }
            // match the single class only
            else if (pointcutPattern.getClassPattern().matches(classMetaData.getName())) {
                jexlContext.getVars().put(name, Boolean.TRUE);
            }
            else {
                jexlContext.getVars().put(name, Boolean.FALSE);
            }
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.