Package org.codehaus.aspectwerkz.attribdef.definition.attribute

Examples of org.codehaus.aspectwerkz.attribdef.definition.attribute.IntroduceAttribute


    private void parseClassAttributes(final Class klass, AspectDefinition aspectDef) {
        if (klass == null) throw new IllegalArgumentException("class can not be null");

        Object[] classAttributes = Attributes.getAttributes(klass);
        for (int i = 0; i < classAttributes.length; i++) {
            IntroduceAttribute introduceAttr = null;
            if (classAttributes[i] instanceof IntroduceAttribute) {
                introduceAttr = (IntroduceAttribute) classAttributes[i];

                Class mixin = null;
                try {
                    mixin = klass.getClassLoader().loadClass(introduceAttr.getInnerClassName());
                } catch (ClassNotFoundException e) {
                    throw new WrappedRuntimeException(e);
                }
                Method[] methods = (Method[]) TransformationUtil.createSortedMethodList(mixin).toArray(new Method[]{});//gatherMixinSortedMethods(mixin, introduceAttr.getIntroducedInterfaceNames());
                createAndAddIntroductionDefToAspectDef(
                        introduceAttr.getExpression(),
                        introduceAttr.getInnerClassName(),
                        introduceAttr.getIntroducedInterfaceNames(),
                        methods,
                        introduceAttr.getDeploymentModel(),
                        aspectDef
                );
            }
        }
    }
View Full Code Here


                    log("\tintroduction introduce implicit [" + introducedInterfaceNames[j] +"]");
                }
            }

            enhancer.insertClassAttribute(
                    new IntroduceAttribute(
                            expression,
                            innerClass.getFullyQualifiedName(),
                            introducedInterfaceNames,
                            deploymentModel)
            );
View Full Code Here

                    log("\tintroduction introduce implicit [" + introducedInterfaceNames[j] +"]");
                }
            }

            enhancer.insertClassAttribute(
                    new IntroduceAttribute(
                            expression,
                            innerClass.getFullyQualifiedName(),
                            introducedInterfaceNames,
                            deploymentModel)
            );
View Full Code Here

    private void parseClassAttributes(final Class klass, AspectDefinition aspectDef) {
        if (klass == null) throw new IllegalArgumentException("class can not be null");

        Object[] classAttributes = Attributes.getAttributes(klass);
        for (int i = 0; i < classAttributes.length; i++) {
            IntroduceAttribute introduceAttr = null;
            if (classAttributes[i] instanceof IntroduceAttribute) {
                introduceAttr = (IntroduceAttribute) classAttributes[i];

                Class mixin = null;
                try {
                    mixin = klass.getClassLoader().loadClass(introduceAttr.getInnerClassName());
                } catch (ClassNotFoundException e) {
                    throw new WrappedRuntimeException(e);
                }
                Method[] methods = (Method[]) TransformationUtil.createSortedMethodList(mixin).toArray(new Method[]{});//gatherMixinSortedMethods(mixin, introduceAttr.getIntroducedInterfaceNames());
                createAndAddIntroductionDefToAspectDef(
                        introduceAttr.getExpression(),
                        introduceAttr.getInnerClassName(),
                        introduceAttr.getIntroducedInterfaceNames(),
                        methods,
                        introduceAttr.getDeploymentModel(),
                        aspectDef
                );
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.attribdef.definition.attribute.IntroduceAttribute

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.