Package org.codehaus.aspectwerkz.expression

Examples of org.codehaus.aspectwerkz.expression.ExpressionNamespace


     * @param node
     * @param data
     * @return
     */
    public Object visit(ASTPointcutReference node, Object data) {
        ExpressionNamespace namespace = ExpressionNamespace.getNamespace(m_namespace);
        CflowAspectExpressionVisitor expression = namespace.getExpressionInfo(node.getName()).getCflowAspectExpression();
        return expression.populateCflowAspectBindings((List)data);
    }
View Full Code Here


        addVirtualAspect(definition);

        // parse the global pointcuts
        List globalPointcuts = parseGlobalPointcutDefs(systemElement);
        //FIXME: systemDef should link a namespace, + remove static hashmap in Namespace (uuid clash in parallel CL)
        ExpressionNamespace systemNamespace = ExpressionNamespace.getNamespace(definition.getUuid());
        for (Iterator iterator = globalPointcuts.iterator(); iterator.hasNext();) {
            PointcutInfo pointcutInfo = (PointcutInfo) iterator.next();
            systemNamespace.addExpressionInfo(
                    pointcutInfo.name, new ExpressionInfo(pointcutInfo.expression, systemNamespace.getName())
            );
        }

        // parse the global deployment scopes definitions
        parseDeploymentScopeDefs(systemElement, definition);
View Full Code Here

        addVirtualAspect(definition);

        // parse the global pointcuts
        List globalPointcuts = parseGlobalPointcuts(systemElement);
        //FIXME: systemDef should link a namespace, + remove static hashmap in Namespace (uuid clash in parallel CL)
        ExpressionNamespace systemNamespace = ExpressionNamespace.getNamespace(definition.getUuid());
        for (Iterator iterator = globalPointcuts.iterator(); iterator.hasNext();) {
            PointcutInfo pointcutInfo = (PointcutInfo) iterator.next();
            systemNamespace.addExpressionInfo(
                    pointcutInfo.name, new ExpressionInfo(pointcutInfo.expression, systemNamespace.getName())
            );
        }

        // parse the global deployment scope
        List globalDeploymentScopes = parseGlobalDeploymentScope(systemElement);
View Full Code Here

        }

        // do a lookup first to avoid infinite recursion when:
        // <pointcut name="pc" ...> [will be registered as pc]
        // <advice bind-to="pc" ...> [will be registered as pc and should not override previous one !]
        ExpressionNamespace namespace = ExpressionNamespace.getNamespace(aspectDef.getQualifiedName());
        ExpressionInfo info = namespace.getExpressionInfoOrNull(pointcutName);
        if (info == null) {
            info = new ExpressionInfo(expression, aspectDef.getQualifiedName());
            // extract the pointcut signature map
            if (pointcutCallSignature != null) {
                String[] parameters = Strings.splitString(pointcutCallSignature, ",");
View Full Code Here

        //if (true) return;

        final String aspectName = "examples.logging.JavaLoggingAspect";
        SystemDefinition sysDef = DefinitionLoader.getDefinition(HotSwapTarget.class.getClassLoader(), "hotdeployed");
        AspectDefinition aspectDef = sysDef.getAspectDefinition(aspectName);
        ExpressionNamespace namespace = ExpressionNamespace.getNamespace(aspectDef.getFullQualifiedName());
        ExpressionInfo expressionInfo = new ExpressionInfo(pointcut, aspectDef.getFullQualifiedName());
        namespace.addExpressionInfo(pointcutName, expressionInfo);
        AdviceDefinition newDef = null;
        for (Iterator arounds = aspectDef.getAroundAdvices().iterator(); arounds.hasNext();) {
            AdviceDefinition around = (AdviceDefinition)arounds.next();
            if (around.getName().equals(aspectName + ".logMethod")) {
                // copy the logMethod advice
View Full Code Here

        aspectDef.addPointcut(pointcutDef);

        // do a lookup first to avoid infinite recursion when:
        // <pointcut name="pc" ...>    [will be registered as pc]
        // <advice bind-to="pc" ...>   [will be registered as pc and should not override previous one !]
        ExpressionNamespace namespace = ExpressionNamespace.getNamespace(aspectDef.getFullQualifiedName());
        ExpressionInfo info = namespace.getExpressionInfo(name);
        if (info == null) {
            info = new ExpressionInfo(expression, aspectDef.getFullQualifiedName());
        }
        ExpressionNamespace.getNamespace(aspectDef.getFullQualifiedName()).addExpressionInfo(name, info);
View Full Code Here

        }

        // do a lookup first to avoid infinite recursion when:
        // <pointcut name="pc" ...> [will be registered as pc]
        // <advice bind-to="pc" ...> [will be registered as pc and should not override previous one !]
        ExpressionNamespace namespace = ExpressionNamespace.getNamespace(aspectDef.getFullQualifiedName());
        ExpressionInfo info = namespace.getExpressionInfo(pointcutName);
        if (info == null) {
            info = new ExpressionInfo(expression, aspectDef.getFullQualifiedName());
            // extract the pointcut signature map
            if (pointcutCallSignature != null) {
                String[] parameters = Strings.splitString(pointcutCallSignature, ",");
View Full Code Here

        final String aspectName = "examples.logging.JavaLoggingAspect";
        SystemDefinition sysDef = DefinitionLoader.getDefinition(HotSwapTarget.class
                .getClassLoader(), "hotdeployed");
        AspectDefinition aspectDef = sysDef.getAspectDefinition(aspectName);
        ExpressionNamespace namespace = ExpressionNamespace.getNamespace(aspectDef
                .getFullQualifiedName());
        ExpressionInfo expressionInfo = new ExpressionInfo(pointcut, aspectDef
                .getFullQualifiedName());
        namespace.addExpressionInfo(pointcutName, expressionInfo);
        AdviceDefinition newDef = null;
        for (Iterator arounds = aspectDef.getAroundAdvices().iterator(); arounds.hasNext();) {
            AdviceDefinition around = (AdviceDefinition) arounds.next();
            if (around.getName().equals(aspectName + ".logMethod")) {
                // copy the logMethod advice
View Full Code Here

        return match;
    }

    public Object visit(ASTPointcutReference node, Object data) {
        ExpressionContext context = (ExpressionContext) data;
        ExpressionNamespace namespace = ExpressionNamespace.getNamespace(m_namespace);
        ExpressionVisitor expression = namespace.getExpression(node.getName());

        // build a new RuntimeCheckVisitor to visit the sub expression
        RuntimeCheckVisitor referenced = new RuntimeCheckVisitor(
                m_compiler, cv, expression.getExpressionInfo(),
                m_isOptimizedJoinPoint, m_joinPointIndex,
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.expression.ExpressionNamespace

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.