Package org.codehaus.aspectwerkz.aspect.management

Examples of org.codehaus.aspectwerkz.aspect.management.AspectManager


        Pointcut cflowPointcut = null;

        ExpressionContext ctx = new ExpressionContext(type, reflectInfo, withinInfo);//AVAJ null?
        AspectManager[] aspectManagers = system.getAspectManagers();
        for (int i = 0; i < aspectManagers.length; i++) {
            AspectManager aspectManager = aspectManagers[i];

            /// grab the first one found, one single cflow pointcut is enough per join point
            if (cflowPointcut == null) {
                List cflowPointcuts = aspectManager.getCflowPointcuts(ctx);
                if (!cflowPointcuts.isEmpty()) {
                    cflowPointcut = (Pointcut) cflowPointcuts.get(0);
                }
            }

            // get all matching pointcuts from all managers
            for (Iterator it = aspectManager.getPointcuts(ctx).iterator(); it.hasNext();) {
                Pointcut pointcut = (Pointcut) it.next();

                AdviceInfo[] aroundAdviceIndexes = pointcut.getAroundAdviceIndexes();
                AdviceInfo[] beforeAdviceIndexes = pointcut.getBeforeAdviceIndexes();
                AdviceInfo[] afterAdviceIndexes = pointcut.getAfterAdviceIndexes();
View Full Code Here


        List cflowExpressionList = new ArrayList();
        Pointcut cflowPointcut = null;
        ExpressionContext ctx = new ExpressionContext(type, reflectInfo, withinInfo);
        AspectManager[] aspectManagers = system.getAspectManagers();
        for (int i = 0; i < aspectManagers.length; i++) {
            AspectManager aspectManager = aspectManagers[i];

            /// grab the first one found, one single cflow pointcut is enough per join point
            if (cflowPointcut == null) {
                List cflowPointcuts = aspectManager.getCflowPointcuts(ctx);
                if (!cflowPointcuts.isEmpty()) {
                    cflowPointcut = (Pointcut) cflowPointcuts.get(0);
                }
            }

            // get all matching pointcuts from all managers
            for (Iterator it = aspectManager.getPointcuts(ctx).iterator(); it.hasNext();) {
                Pointcut pointcut = (Pointcut) it.next();
                AdviceInfo[] aroundAdviceIndexes = pointcut.getAroundAdviceIndexes();
                AdviceInfo[] beforeAdviceIndexes = pointcut.getBeforeAdviceIndexes();
                AdviceInfo[] afterAdviceIndexes = pointcut.getAfterAdviceIndexes();
View Full Code Here

     * @param loader the class loader
     * @param definition the definition for the system
     */
    public static void reinitializeSystem(final ClassLoader loader, final SystemDefinition definition) {
        AspectSystem aspectSystem = SystemLoader.getSystem(loader);
        AspectManager aspectManager = aspectSystem.getAspectManager(definition.getUuid());

        // TODO better runtime part sync with def part for RW/RuW/HotDeploy
        // when altering existing pc, those needs to be updated manaually (see EWorldUtil)
        registerPointcuts(aspectManager, definition);
        registerCflowPointcuts(aspectManager, definition);
View Full Code Here

        }
        if (definition == null) {
            throw new IllegalArgumentException("definition can not be null");
        }

        m_aspectManager = new AspectManager(uuid, definition);

        if (START_REMOTE_PROXY_SERVER) {
            startRemoteProxyServer();
        }
    }
View Full Code Here

        }
        if (definition == null) {
            throw new IllegalArgumentException("definition can not be null");
        }

        m_aspectManager = new AspectManager(uuid, definition);

        if (START_REMOTE_PROXY_SERVER) {
            startRemoteProxyServer();
        }
    }
View Full Code Here

        for (int i = 0; i < m_aspectManagers.length; i++) {
            SystemDefinition def = (SystemDefinition)definitions.get(i);
            String uuid = def.getUuid();

            // check if the SystemDefinition comes from a parent AspectSystem before adding it
            AspectManager aspectManager = null;
            try {
                aspectManager = getAspectManager(uuid);
            } catch (DefinitionException e) {
                ;
            }
            if (aspectManager == null) {
                // new def defined in THIS CL and not a parent one
                aspectManager = new AspectManager(this, def);

                //System.out.println("created AspectManager = " + uuid + ": " + aspectManager);
            } else {
                //System.out.println("reused AspectManager = " + uuid + ": " + aspectManager);
                continue;
View Full Code Here

     * @throws DefinitionException (runtime exception) if not found
     */
    public AspectManager getAspectManager(final String uuid) {
        // Note: uuid is assumed to be unique within an AspectSystem
        for (int i = 0; i < m_aspectManagers.length; i++) {
            AspectManager aspectManager = m_aspectManagers[i];

            // the null check makes sense only in the flow of <init>
            if ((aspectManager != null) && aspectManager.getUuid().equals(uuid)) {
                return aspectManager;
            }
        }
        throw new DefinitionException("no AspectManager with system id " + uuid + " in " + m_classLoader);
    }
View Full Code Here

        AspectManager[] currentAspectManagers = system.getAspectManagers();
        AspectManager[] newAspectManagers = new AspectManager[currentAspectManagers.length + definitions.size()];
        System.arraycopy(currentAspectManagers, 0, newAspectManagers, 0, currentAspectManagers.length);
        int index = currentAspectManagers.length;
        for (Iterator it = definitions.iterator(); it.hasNext();) {
            newAspectManagers[index++] = new AspectManager(system, (SystemDefinition)it.next());
        }

        // now we should grab all subclassloader' AspectSystem and rebuild em
        Collection systems = SystemLoader.getAllSystems();
        for (Iterator it = systems.iterator(); it.hasNext();) {
View Full Code Here

     * @param loader     the class loader
     * @param definition the definition for the system
     */
    public static void reinitializeSystem(final ClassLoader loader, final SystemDefinition definition) {
        AspectSystem aspectSystem = SystemLoader.getSystem(loader);
        AspectManager aspectManager = aspectSystem.getAspectManager(definition.getUuid());

        // TODO better runtime part sync with def part for RW/RuW/HotDeploy
        // when altering existing pc, those needs to be updated manaually (see EWorldUtil)
        registerPointcuts(aspectManager, definition);
        registerCflowPointcuts(aspectManager, definition);
View Full Code Here

        Pointcut cflowPointcut = null;

        ExpressionContext ctx = new ExpressionContext(type, reflectInfo, withinInfo);//AVAJ null?
        AspectManager[] aspectManagers = system.getAspectManagers();
        for (int i = 0; i < aspectManagers.length; i++) {
            AspectManager aspectManager = aspectManagers[i];

            /// grab the first one found, one single cflow pointcut is enough per join point
            if (cflowPointcut == null) {
                List cflowPointcuts = aspectManager.getCflowPointcuts(ctx);
                if (!cflowPointcuts.isEmpty()) {
                    cflowPointcut = (Pointcut) cflowPointcuts.get(0);
                }
            }

            // get all matching pointcuts from all managers
            for (Iterator it = aspectManager.getPointcuts(ctx).iterator(); it.hasNext();) {
                Pointcut pointcut = (Pointcut) it.next();

                AdviceInfo[] aroundAdviceIndexes = pointcut.getAroundAdviceIndexes();
                AdviceInfo[] beforeAdviceIndexes = pointcut.getBeforeAdviceIndexes();
                AdviceInfo[] afterFinallyAdviceIndexes = pointcut.getAfterFinallyAdviceIndexes();
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.aspect.management.AspectManager

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.