Package org.codehaus.aspectwerkz.transform.inlining.compiler

Examples of org.codehaus.aspectwerkz.transform.inlining.compiler.CompilationInfo$Model


        final Class clazz = JoinPointFactory.compileJoinPointAndAttachToClassLoader(
                compilationModel, calleeClass.getClassLoader()
        );

        JoinPointFactory.addCompilationInfo(clazz, new CompilationInfo(compilationModel));
    }
View Full Code Here


        final ChangeSet changeSet = new ChangeSet();
        for (Iterator it = allMatchingJoinPoints.iterator(); it.hasNext();) {
            final MatchingJoinPointInfo joinPointInfo = (MatchingJoinPointInfo) it.next();

            final CompilationInfo compilationInfo = joinPointInfo.getCompilationInfo();
            compilationInfo.incrementRedefinitionCounter();

            changeSet.addElement(new ChangeSet.Element(compilationInfo, joinPointInfo));
        }

        doRedefine(changeSet);
View Full Code Here

     * Compiles a completely new join point instance based on the new redefined model.
     *
     * @param changeSetElement the change set item
     */
    private static void compileNewJoinPoint(final ChangeSet.Element changeSetElement) {
        final CompilationInfo compilationInfo = changeSetElement.getCompilationInfo();
        final MatchingJoinPointInfo joinPointInfo = changeSetElement.getJoinPointInfo();
        final ClassLoader loader = joinPointInfo.getJoinPointClass().getClassLoader();
        final AdviceInfoContainer newAdviceContainer = JoinPointManager.getAdviceInfoContainerForJoinPoint(
                joinPointInfo.getExpressionContext(),
                loader
        );
        final CompilationInfo.Model redefinedModel = new CompilationInfo.Model(
                compilationInfo.getInitialModel().getEmittedJoinPoint(), // copy the reference since it is the same
                newAdviceContainer,
                compilationInfo.getRedefinitionCounter()
        );
        JoinPointFactory.compileJoinPointAndAttachToClassLoader(redefinedModel, loader);

        compilationInfo.setRedefinedModel(redefinedModel);
        JoinPointFactory.addCompilationInfo(joinPointInfo.getJoinPointClass(), compilationInfo);
    }
View Full Code Here

    /**
     * Find the Model of a ressource (UML2 Model)
     */
    public static Model findModel(final UML2Resource resource)
    {
        Model model = (Model)EcoreUtil.getObjectByType(
                resource.getContents(),
                EcorePackage.eINSTANCE.getEObject());
        if (logger.isDebugEnabled())
        {
            logger.debug("Model found: " + model);
View Full Code Here

            null);
        final ModelAccessFacade modelFacade = repository.getModel();
        assertNotNull(modelFacade);
        assertNotNull(modelFacade.getModel());
        assertTrue(modelFacade.getModel() instanceof UML2Resource);
        Model model = (Model)EcoreUtil.getObjectByType(
            ((UML2Resource)repository.getModel().getModel()).getContents(),
            EcorePackage.eINSTANCE.getEObject());
        assertEquals(
            "Test Model",
            model.getName());
        Collection elements = UML2Util.findNamedElements(
                model.eResource(),
                "Test Model::testPackage::Top",
                true);
        org.eclipse.uml2.Class umlClass = (org.eclipse.uml2.Class)elements.iterator().next();
        assertEquals(
            "Top",
View Full Code Here

    }
    return null;
  }

  private Package addPackage(String name, ModelAccessFacade model) {
    Model m = (Model) ((UML2Resource) model.getModel()).getContents()
        .get(0);
    return m.createNestedPackage(name);
  }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.transform.inlining.compiler.CompilationInfo$Model

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.