Package org.codehaus.aspectwerkz.transform.inlining.spi

Examples of org.codehaus.aspectwerkz.transform.inlining.spi.AspectModel$AroundClosureClassInfo


        // get the different aspect models required interfaces

        for (int i = 0; i < m_aspectModels.length; i++) {

            AspectModel aspectModel = m_aspectModels[i];

            AspectModel.AroundClosureClassInfo closureClassInfo = aspectModel.getAroundClosureClassInfo();

            final String superClassName = closureClassInfo.getSuperClassName();

            final String[] interfaceNames = closureClassInfo.getInterfaceNames();
View Full Code Here


            // non-AW aspect

            final String type = aspectInfo.getAspectDefinition().getAspectModel();

            final AspectModel aspectModel = AspectModelManager.getModelFor(type);

            aspectModel.createAspectReferenceField(m_cw, aspectInfo, m_joinPointClassName);

            aspectModel.createAspectInstantiation(cv, aspectInfo, m_joinPointClassName);

        }


View Full Code Here

                adviceMethodInfo.setJoinPointIndex(joinPointInstanceIndex);

                for (int j = 0; j < m_aspectModels.length; j++) {

                    AspectModel aspectModel = m_aspectModels[j];

                    if (aspectDef.getAspectModel().equals(aspectModel.getAspectModelType())) {

                        aspectModel.createBeforeAdviceArgumentHandling(cv, adviceMethodInfo);

                    }

                }
View Full Code Here

            adviceMethodInfo.setJoinPointIndex(joinPointInstanceIndex);

            for (int i = 0; i < m_aspectModels.length; i++) {

                AspectModel aspectModel = m_aspectModels[i];

                if (aspectDef.getAspectModel().equals(aspectModel.getAspectModelType())) {

                    aspectModel.createAfterAdviceArgumentHandling(cv, adviceMethodInfo);

                }

            }
View Full Code Here

     * @param type the aspect model type id
     * @return the aspect model
     */
    public static AspectModel getModelFor(String type) {
        for (int i = 0; i < ASPECT_MODELS.length; i++) {
            AspectModel aspectModel = ASPECT_MODELS[i];
            if (aspectModel.getAspectModelType().equals(type)) {
                return aspectModel;
            }
        }
        return null;
    }
View Full Code Here

                    }

                } else {

                    final AspectModel aspectModel = AspectModelManager.getModelFor(aspectDef.getAspectModel());

                    final String superClassName = aspectModel.getAroundClosureClassInfo().getSuperClassName();

                    final String[] interfaces = aspectModel.getAroundClosureClassInfo().getInterfaceNames();

                    final String[] classNames = new String[interfaces.length + 1];

                    classNames[0] = superClassName;
View Full Code Here

                                "Unbound unnamed advice parameter at index " + i +
                                " in " + adviceInfo.getMethodSignature()
                        );
                    }
                } else {
                    final AspectModel aspectModel = AspectModelManager.getModelFor(aspectDef.getAspectModel());
                    final String superClassName = aspectModel.getAroundClosureClassInfo().getSuperClassName();
                    final String[] interfaces = aspectModel.getAroundClosureClassInfo().getInterfaceNames();
                    final String[] classNames = new String[interfaces.length + 1];
                    classNames[0] = superClassName;
                    for (int j = 1; j < interfaces.length + 1; j++) {
                        classNames[j] = interfaces[j - 1];
                    }
View Full Code Here

            AspectDefinition aspectDef = m_aspectInfos[i].getAspectDefinition();
            if (aspectDef.isAspectWerkzAspect()) {
                continue; // AW Aspect Model not managed by AspectModelManager
            }
            String type = aspectDef.getAspectModel();
            AspectModel aspectModel = AspectModelManager.getModelFor(type);
            aspectModelMap.put(type, aspectModel);
            if (aspectModel.requiresReflectiveInfo()) {
                m_requiresJoinPoint = true; // if at least one model requries RTTI then build it
            }
        }
        m_aspectModels = (AspectModel[]) aspectModelMap.values().toArray(new AspectModel[aspectModelMap.size()]);
    }
View Full Code Here

    protected void createInit() {
        CodeVisitor cv = m_cw.visitMethod(ACC_PRIVATE, INIT_METHOD_NAME, NO_PARAM_RETURN_VOID_SIGNATURE, null, null);
        cv.visitVarInsn(ALOAD, 0);

        boolean hasAroundClosureBaseClass = false;
        AspectModel aspectModel = null;

        for (int i = 0; i < m_aspectModels.length; i++) {
            aspectModel = m_aspectModels[i];
            if (aspectModel.getAroundClosureClassInfo().getSuperClassName() != null) {
                hasAroundClosureBaseClass = true;
                break;
            }
        }

        if (hasAroundClosureBaseClass) {
            // invoke the super class constructor
            aspectModel.createInvocationOfAroundClosureSuperClass(cv);
        } else {
            // invoke the constructor of java.lang.Object
            cv.visitMethodInsn(INVOKESPECIAL, OBJECT_CLASS_NAME, INIT_METHOD_NAME, NO_PARAM_RETURN_VOID_SIGNATURE);
        }
View Full Code Here

        Set interfaces = new HashSet();
        String baseClass = OBJECT_CLASS_NAME;

        // get the different aspect models required interfaces
        for (int i = 0; i < m_aspectModels.length; i++) {
            AspectModel aspectModel = m_aspectModels[i];
            AspectModel.AroundClosureClassInfo closureClassInfo = aspectModel.getAroundClosureClassInfo();
            final String superClassName = closureClassInfo.getSuperClassName();
            final String[] interfaceNames = closureClassInfo.getInterfaceNames();
            if (superClassName != null) {
                if (!baseClass.equals(OBJECT_CLASS_NAME)) {
                    throw new RuntimeException(
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.transform.inlining.spi.AspectModel$AroundClosureClassInfo

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.