Package org.codehaus.aspectwerkz.attribdef.definition

Examples of org.codehaus.aspectwerkz.attribdef.definition.AspectDefinition


    public boolean hasCallPointcut(final ClassMetaData classMetaData) {
        if (!m_aspectsLoaded) throw new IllegalStateException("aspects are not loaded");
        if (classMetaData == null) throw new IllegalArgumentException("class meta-data can not be null");

        for (Iterator it = m_aspectMap.values().iterator(); it.hasNext();) {
            AspectDefinition aspectDef = (AspectDefinition)it.next();
            for (Iterator it2 = aspectDef.getAllAdvices().iterator(); it2.hasNext();) {
                AdviceDefinition adviceDef = (AdviceDefinition)it2.next();
                Expression expression = adviceDef.getExpression();
                if (expression.getType().equals(PointcutType.CALL)
                        && expression.match(classMetaData)) {
                    return true;
View Full Code Here


        if (!m_aspectsLoaded) throw new IllegalStateException("aspects are not loaded");
        if (classMetaData == null) throw new IllegalArgumentException("class meta-data can not be null");
        if (methodMetaData == null) throw new IllegalArgumentException("method meta-data can not be null");

        for (Iterator it = m_aspectMap.values().iterator(); it.hasNext();) {
            AspectDefinition aspectDef = (AspectDefinition)it.next();
            for (Iterator it2 = aspectDef.getAllAdvices().iterator(); it2.hasNext();) {
                AdviceDefinition adviceDef = (AdviceDefinition)it2.next();
                Expression expression = adviceDef.getExpression();
                if (expression.getType().equals(PointcutType.CALL)
                        && expression.match(classMetaData, methodMetaData)) {
                    return true;
View Full Code Here

     * @param loader the class loader to use
     */
    private void loadAspect(final String aspectClassName, final ClassLoader loader) {
        try {
            Class klass = loader.loadClass(aspectClassName);
            AspectDefinition aspectDef = m_attributeParser.parse(klass);
            addAspect(aspectDef);

            for (Iterator mixins = aspectDef.getInterfaceIntroductions().iterator(); mixins.hasNext();) {
                addInterfaceIntroductionDefinition((InterfaceIntroductionDefinition)mixins.next());
            }
            for (Iterator mixins = aspectDef.getIntroductions().iterator(); mixins.hasNext();) {
                addIntroductionDefinition((IntroductionDefinition)mixins.next());
            }
        }
        catch (ClassNotFoundException e) {
            throw new WrappedRuntimeException(e);
View Full Code Here

        String aspectName = aspectAttr.getName();
        if (aspectName == null) {
            aspectName = className; // if no name is specified use the full class name of the aspect as name
        }
        // create the aspect definition
        AspectDefinition aspectDef = new AspectDefinition(
                aspectName,
                className,
                aspectAttr.getDeploymentModel()
        );
        parseFieldAttributes(klass, aspectDef);
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.attribdef.definition.AspectDefinition

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.