Package org.codehaus.aspectwerkz.exception

Examples of org.codehaus.aspectwerkz.exception.ExpressionException


     * Compiles the pattern for the expression.
     */
    protected void compilePattern() {
        PatternTuple tuple = null;
        if (m_type == null) {
            throw new ExpressionException("pointcut type in context can not be null");
        }
        if (m_type.equals(PointcutType.EXECUTION)) {
            if (Pattern.isConstructor(m_expression)) {
                tuple = PatternFactory.createConstructorPatternTuple(m_expression, m_package);
                m_memberPattern = Pattern.compileConstructorPattern(tuple.getMemberPattern());
View Full Code Here


            expr = Expression.createClassExpression(
                    namespace, expression, packageNamespace, name
            );
        }
        else {
            throw new ExpressionException("poincut type is not supported: " + type);
        }
        return expr;
    }
View Full Code Here

     * @TODO: impl. CFLOW
     */
    protected void compilePattern() {
        PatternTuple tuple = null;
        if (m_type == null) {
            throw new ExpressionException("pointcut type in context can not be null");
        }
        if (m_type.equals(PointcutType.EXECUTION)) {
            tuple = PatternFactory.createMethodPatternTuple(m_expression, m_package);
            m_memberPattern = Pattern.compileMethodPattern(tuple.getMemberPattern());
            m_isHierarchical = tuple.isHierarchical();
View Full Code Here

    protected void createJexlExpression() {
        try {
            m_jexlExpr = ExpressionFactory.createExpression(m_expression);
        }
        catch (Exception e) {
            throw new ExpressionException("could not create jexl expression from: " + m_expression);
        }
    }
View Full Code Here

            String pointcutRef = tokenizer.nextToken();
            ExpressionTemplate template = getExpressionTemplate(m_namespace, pointcutRef);

            if (template == null) {
                throw new ExpressionException("referenced pointcut [" + pointcutRef + "] does not exist");
            }
            currentType = template.getType();

            if (hasTypeMisMatch(previousType, currentType)) {
                StringBuffer msg = new StringBuffer();
                msg.append("nested expressions needs to be of the same type: [");
                msg.append(template.getExpression());
                msg.append("] : [");
                msg.append(m_expression);
                msg.append(']');
                throw new ExpressionException(msg.toString());
            }

            if (pointcutType == null && !currentType.equals(PointcutType.CFLOW)) {
                pointcutType = currentType;
            }
View Full Code Here

                        template.getPackage(),
                        pointcutRef
                );
            }
            else {
                throw new ExpressionException("pointcut type not supported: " + type);
            }
            m_expressionRefs.put(pointcutRef, expression);
        }
    }
View Full Code Here

        else if (m_type.equals(PointcutType.CLASS)) {
            // TODO: is it correct to match the membermetadata as well at this point for the class pointcut?
            return ((ClassPattern)m_memberPattern).matches(((ClassMetaData)memberMetaData).getName());
        }
        else {
            throw new ExpressionException("pointcut type not supported: " + m_type);
        }
    }
View Full Code Here

            }
            else if (pointcutType.equals(PointcutType.CLASS)) {
                pointcutDefElement.addAttribute("type", "class");
            }
            else {
                throw new ExpressionException("pointcut type not supported: " + pointcutType);
            }

            Expression.createExpressionTemplate(
                    aspectDef.getName(),
                    pointcutDef.getExpression(),
View Full Code Here

     * Compiles the pattern for the expression.
     */
    protected void compilePattern() {
        PatternTuple tuple = null;
        if (m_type == null) {
            throw new ExpressionException("pointcut type in context can not be null");
        }
        if (m_type.equals(PointcutType.EXECUTION)) {
            if (Pattern.isConstructor(m_expression)) {
                tuple = PatternFactory.createConstructorPatternTuple(m_expression, m_package);
                m_memberPattern = Pattern.compileConstructorPattern(tuple.getMemberPattern());
View Full Code Here

            expr = createClassExpression(
                    expression, packageNamespace, name
            );
        }
        else {
            throw new ExpressionException("poincut type is not supported: " + type);
        }
        return expr;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.exception.ExpressionException

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.