Examples of BindAdviceRule


Examples of org.codehaus.aspectwerkz.xmldef.definition.BindAdviceRule

     * @param aspectDef the aspect definition
     */
    private static void handleBindAdviceRules(final Element aspectElement,
                                              final AspectDefinition aspectDef) {
        for (Iterator it = aspectDef.getBindAdviceRules().iterator(); it.hasNext();) {
            BindAdviceRule bindAdviceRule = (BindAdviceRule)it.next();

            Element element = aspectElement.addElement("bind-advice");
            element.addAttribute("pointcut", bindAdviceRule.getExpression().getExpression());

// TODO: how to handle cflow?
//            String cflowExpression = bindAdviceRule.getCFlowExpression();
//            if (cflowExpression != null) {
//                element.addAttribute("cflow", cflowExpression);
//            }

            for (Iterator it2 = bindAdviceRule.getAdviceRefs().iterator(); it2.hasNext();) {
                String adviceRef = (String)it2.next();

                Element adviceRefElement = element.addElement("advice-ref");
                adviceRefElement.addAttribute("name", adviceRef);
            }
View Full Code Here

Examples of org.codehaus.aspectwerkz.xmldef.definition.BindAdviceRule

                            if (adviceRef == null) {
                                // TODO: log a warning
                                continue; // attribute not mapped to an advice
                            }
                            // create and add a new rule
                            BindAdviceRule bindAdviceRule = new BindAdviceRule();
                            bindAdviceRule.setExpression(
                                    Expression.createExecutionExpression(
                                            aspectDef.getName(),
                                            expression,
                                            "",
                                            pointcutName
                                    ));
                            // TODO: how to handle cflow?
//                            bindAdviceRule.setCFlowExpression(cflowRef);
                            bindAdviceRule.addAdviceRef(adviceRef);
                            aspectDef.addBindAdviceRule(bindAdviceRule);

                            counter++;
                            break;
                        }
View Full Code Here

Examples of org.codehaus.aspectwerkz.xmldef.definition.BindAdviceRule

                                // TODO: log a warning
                                continue; // attribute not mapped to an advice
                            }

                            // create and add a new weaving rule def
                            BindAdviceRule bindAdviceRule = new BindAdviceRule();
                            bindAdviceRule.setExpression(
                                    Expression.createSetExpression(
                                            aspectDef.getName(),
                                            expression,
                                            "",
                                            pointcutName
                                    ));
                            bindAdviceRule.addAdviceRef(adviceRef);
                            aspectDef.addBindAdviceRule(bindAdviceRule);

                            counter++;
                            break;
                        }
View Full Code Here

Examples of org.codehaus.aspectwerkz.xmldef.definition.BindAdviceRule

                                // TODO: log a warning
                                continue; // attribute not mapped to an advice
                            }

                            // create and add a new weaving rule def
                            BindAdviceRule bindAdviceRule = new BindAdviceRule();
                            bindAdviceRule.setExpression(
                                    Expression.createGetExpression(
                                            aspectDef.getName(),
                                            expression,
                                            "",
                                            pointcutName
                                    ));
                            bindAdviceRule.addAdviceRef(adviceRef);
                            aspectDef.addBindAdviceRule(bindAdviceRule);

                            counter++;
                            break;
                        }
View Full Code Here

Examples of org.codehaus.aspectwerkz.xmldef.definition.BindAdviceRule

                            if (adviceRef == null) {
                                // TODO: log a warning
                                continue; // attribute not mapped to an advice
                            }

                            BindAdviceRule bindAdviceRule = new BindAdviceRule();
                            bindAdviceRule.setExpression(Expression.createThrowsExpression(
                                    aspectDef.getName(),
                                    expression,
                                    "",
                                    pointcutName
                            ));
                            bindAdviceRule.addAdviceRef(adviceRef);
                            aspectDef.addBindAdviceRule(bindAdviceRule);

                            counter++;
                            break;
                        }
View Full Code Here

Examples of org.codehaus.aspectwerkz.xmldef.definition.BindAdviceRule

                                // TODO: log a warning
                                continue; // attribute not mapped to an advice
                            }

                            // create and add a new weaving rule def
                            BindAdviceRule bindAdviceRule = new BindAdviceRule();
                            bindAdviceRule.setExpression(Expression.createCallExpression(
                                    aspectDef.getName(),
                                    expression,
                                    "",
                                    pointcutName
                            ));
                            bindAdviceRule.addAdviceRef(adviceRef);
                            aspectDef.addBindAdviceRule(bindAdviceRule);

                            counter++;
                            break;
                        }
View Full Code Here

Examples of org.codehaus.aspectwerkz.xmldef.definition.BindAdviceRule

     * @param aspectDef the aspect definition
     */
    private static void handleBindAdviceRules(final Element aspectElement,
                                              final AspectDefinition aspectDef) {
        for (Iterator it = aspectDef.getBindAdviceRules().iterator(); it.hasNext();) {
            BindAdviceRule bindAdviceRule = (BindAdviceRule)it.next();

            Element element = aspectElement.addElement("bind-advice");
            String exprName = bindAdviceRule.getExpression().getName();
            if ( exprName != null && exprName.length()>0) {
                element.addAttribute("pointcut", exprName);
            } else {
                // cflow support thru anonymous expression in AttributeC generated
                element.addAttribute("pointcut", bindAdviceRule.getExpression().getExpression());
            }

            for (Iterator it2 = bindAdviceRule.getAdviceRefs().iterator(); it2.hasNext();) {
                String adviceRef = (String)it2.next();

                Element adviceRefElement = element.addElement("advice-ref");
                adviceRefElement.addAttribute("name", adviceRef);
            }
View Full Code Here

Examples of org.codehaus.aspectwerkz.xmldef.definition.BindAdviceRule

                            if (adviceRef == null) {
                                // TODO: log a warning
                                continue; // attribute not mapped to an advice
                            }
                            // create and add a new rule
                            BindAdviceRule bindAdviceRule = new BindAdviceRule();
                            if (cflowRef != null) {
                                bindAdviceRule.setExpression(
                                    ExpressionNamespace.getExpressionNamespace(aspectDef.getName())
                                        .createExpression(expression + " IN " + cflowRef));
                            } else {
                                bindAdviceRule.setExpression(
                                    ExpressionNamespace.getExpressionNamespace(aspectDef.getName())
                                        .getExpression(expression));
                            }
                            bindAdviceRule.addAdviceRef(adviceRef);
                            aspectDef.addBindAdviceRule(bindAdviceRule);

                            counter++;
                            break;
                        }
View Full Code Here

Examples of org.codehaus.aspectwerkz.xmldef.definition.BindAdviceRule

                                // TODO: log a warning
                                continue; // attribute not mapped to an advice
                            }

                            // create and add a new weaving rule def
                            BindAdviceRule bindAdviceRule = new BindAdviceRule();
                            bindAdviceRule.setExpression(
                                    ExpressionNamespace.getExpressionNamespace(aspectDef.getName())
                                        .getExpression(expression));

                            bindAdviceRule.addAdviceRef(adviceRef);
                            aspectDef.addBindAdviceRule(bindAdviceRule);

                            counter++;
                            break;
                        }
View Full Code Here

Examples of org.codehaus.aspectwerkz.xmldef.definition.BindAdviceRule

                                // TODO: log a warning
                                continue; // attribute not mapped to an advice
                            }

                            // create and add a new weaving rule def
                            BindAdviceRule bindAdviceRule = new BindAdviceRule();
                            bindAdviceRule.setExpression(
                                    ExpressionNamespace.getExpressionNamespace(aspectDef.getName())
                                        .getExpression(expression));
                            bindAdviceRule.addAdviceRef(adviceRef);
                            aspectDef.addBindAdviceRule(bindAdviceRule);

                            counter++;
                            break;
                        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.