Package org.codehaus.aspectwerkz.xmldef.definition

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


    public void testAdviceTag() {
        try {
            AspectWerkzDefinition aspectwerkz = (AspectWerkzDefinition)XmlParser.parseNoCache(m_input.toURL()).get(0);
            Iterator it = aspectwerkz.getAdviceDefinitions().iterator();
            AdviceDefinition advice1 = (AdviceDefinition)it.next();
            assertEquals("logging", advice1.getName());
            assertEquals("examples.logging.LoggingAdvice", advice1.getAdviceClassName());
            assertEquals("perClass", advice1.getDeploymentModel());
            assertEquals("log", advice1.getAttribute());
        }
        catch (Exception e) {
            fail();
        }
    }
View Full Code Here


     * Returns the definition for this advice.
     *
     * @return the definition
     */
    public static AdviceDefinition getDefinition() {
        AdviceDefinition definition = new AdviceDefinition();
        definition.setName(NAME);
        definition.setAdviceClassName(CFlowPostAdvice.class.getName());
        definition.setDeploymentModel(DEPLOYMENT_MODEL);
        return definition;
    }
View Full Code Here

        // create the cflow pre and post advice definitions
        addAdviceDefElement(root, CFlowPreAdvice.getDefinition());
        addAdviceDefElement(root, CFlowPostAdvice.getDefinition());

        for (Iterator it = definition.getAdviceDefinitions().iterator(); it.hasNext();) {
            AdviceDefinition def = (AdviceDefinition)it.next();
            addAdviceDefElement(root, def);
        }
    }
View Full Code Here

        for (int i = 0; i < adviceDefTags.length; i++) {
            if (adviceDefTags[i] == null) {
                continue;
            }

            AdviceDefinition adviceDef = new AdviceDefinition();
            adviceDef.setName(adviceDefTags[i].getNamedParameter("name"));
            adviceDef.setAdviceClassName(javaClass.getFullyQualifiedName());
            adviceDef.setDeploymentModel(adviceDefTags[i].getNamedParameter("deployment-model"));
            adviceDef.setAttribute(adviceDefTags[i].getNamedParameter("attribute"));

            weaveAdviceParamAttributes(javaClass, adviceDef);

            definition.addAdvice(adviceDef);
        }
View Full Code Here

     * Returns the definition for this advice.
     *
     * @return the definition
     */
    public static AdviceDefinition getDefinition() {
        AdviceDefinition definition = new AdviceDefinition();
        definition.setName(NAME);
        definition.setAdviceClassName(CFlowPreAdvice.class.getName());
        definition.setDeploymentModel(DEPLOYMENT_MODEL);
        return definition;
    }
View Full Code Here

    public void testAdviceTag() {
        try {
            AspectWerkzDefinition aspectwerkz = (AspectWerkzDefinition)XmlParser.parseNoCache(m_input.toURL()).get(0);
            Iterator it = aspectwerkz.getAdviceDefinitions().iterator();
            AdviceDefinition advice1 = (AdviceDefinition)it.next();
            assertEquals("logging", advice1.getName());
            assertEquals("examples.logging.LoggingAdvice", advice1.getAdviceClassName());
            assertEquals("perClass", advice1.getDeploymentModel());
            assertEquals("log", advice1.getAttribute());
        }
        catch (Exception e) {
            fail();
        }
    }
View Full Code Here

        // create the cflow pre and post advice definitions
        addAdviceDefElement(root, CFlowPreAdvice.getDefinition());
        addAdviceDefElement(root, CFlowPostAdvice.getDefinition());

        for (Iterator it = definition.getAdviceDefinitions().iterator(); it.hasNext();) {
            AdviceDefinition def = (AdviceDefinition)it.next();
            addAdviceDefElement(root, def);
        }
    }
View Full Code Here

        for (int i = 0; i < adviceDefTags.length; i++) {
            if (adviceDefTags[i] == null) {
                continue;
            }

            AdviceDefinition adviceDef = new AdviceDefinition();
            adviceDef.setName(adviceDefTags[i].getNamedParameter("name"));
            adviceDef.setAdviceClassName(javaClass.getFullyQualifiedName());
            adviceDef.setDeploymentModel(adviceDefTags[i].getNamedParameter("deployment-model"));
            adviceDef.setAttribute(adviceDefTags[i].getNamedParameter("attribute"));

            weaveAdviceParamAttributes(javaClass, adviceDef);

            definition.addAdvice(adviceDef);
        }
View Full Code Here

     * Returns the definition for this advice.
     *
     * @return the definition
     */
    public static AdviceDefinition getDefinition() {
        AdviceDefinition definition = new AdviceDefinition();
        definition.setName(NAME);
        definition.setAdviceClassName(CFlowPreAdvice.class.getName());
        definition.setDeploymentModel(DEPLOYMENT_MODEL);
        return definition;
    }
View Full Code Here

     * Returns the definition for this advice.
     *
     * @return the definition
     */
    public static AdviceDefinition getDefinition() {
        AdviceDefinition definition = new AdviceDefinition();
        definition.setName(NAME);
        definition.setAdviceClassName(CFlowPostAdvice.class.getName());
        definition.setDeploymentModel(DEPLOYMENT_MODEL);
        return definition;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.xmldef.definition.AdviceDefinition

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.