Package org.codehaus.aspectwerkz.joinpoint.impl

Examples of org.codehaus.aspectwerkz.joinpoint.impl.FieldSignatureImpl


            Field field = fields[i];

            if (ReflectHelper.calculateHash(field) == joinPointHash) {

                return new FieldSignatureImpl(declaringClass, field);

            }

        }
View Full Code Here


    public static final FieldSignatureImpl newFieldSignature(final Class declaringClass, final int joinPointHash) {
        Field[] fields = declaringClass.getDeclaredFields();
        for (int i = 0; i < fields.length; i++) {
            Field field = fields[i];
            if (ReflectHelper.calculateHash(field) == joinPointHash) {
                return new FieldSignatureImpl(declaringClass, field);
            }
        }
        // lookup in the hierarchy
        if (declaringClass.getSuperclass() != null) {
            return newFieldSignature(declaringClass.getSuperclass(), joinPointHash);
View Full Code Here

    public static final FieldSignatureImpl newFieldSignature(final Class declaringClass, final int joinPointHash) {
        Field[] fields = declaringClass.getDeclaredFields();
        for (int i = 0; i < fields.length; i++) {
            Field field = fields[i];
            if (ReflectHelper.calculateHash(field) == joinPointHash) {
                return new FieldSignatureImpl(declaringClass, field);
            }
        }
        throw new Error(
                "field with hash [" + joinPointHash + "] could not be found in class [" + declaringClass.getName()
        );
View Full Code Here

    }

    public static final FieldSignatureImpl newFieldSignature(final Class declaringClass,
                                                             final int joinPointHash) {
        Field field = AspectRegistry.getField(declaringClass, joinPointHash);
        return new FieldSignatureImpl(field.getDeclaringClass(), field);
    }
View Full Code Here

        final AdviceIndexInfo[] adviceIndexes,
        final JoinPointMetaData joinPointMetaData,
        final Object thisInstance,
        final Object targetInstance) {
        Field field = AspectRegistry.getField(declaringClass, fieldHash);
        FieldSignatureImpl signature = new FieldSignatureImpl(declaringClass, field);
        Rtti rtti = new FieldRttiImpl(signature, thisInstance, targetInstance);
        return new FieldJoinPoint(
            joinPointType,
            m_targetClass,
            signature,
View Full Code Here

                tuple.cflowExpressions = cflowExpressionList;
                tuple.expressionContext = ctx;
                break;
            case JoinPointType.FIELD_SET:
                Field field = AspectRegistry.getField(declaringClass, joinPointHash);
                FieldSignatureImpl fieldSignature = new FieldSignatureImpl(field.getDeclaringClass(), field);
                tuple.signature = fieldSignature;
                tuple.rtti = new FieldRttiImpl(fieldSignature, thisInstance, targetInstance);
                FieldInfo fieldInfo = JavaFieldInfo.getFieldInfo(field);
                ctx = new ExpressionContext(PointcutType.SET, fieldInfo, null);
                for (int i = 0; i < aspectManagers.length; i++) {
                    for (Iterator it = aspectManagers[i].getPointcuts(ctx).iterator(); it.hasNext();) {
                        Pointcut pointcut = (Pointcut)it.next();
                        if (pointcut.getExpressionInfo().hasCflowPointcut()) {
                            cflowExpressionList.add(pointcut.getExpressionInfo().getCflowExpressionRuntime());
                        }
                    }
                }
                tuple.cflowExpressions = cflowExpressionList;
                tuple.expressionContext = ctx;
                break;
            case JoinPointType.FIELD_GET:
                field = AspectRegistry.getField(declaringClass, joinPointHash);
                fieldSignature = new FieldSignatureImpl(field.getDeclaringClass(), field);
                tuple.signature = fieldSignature;
                tuple.rtti = new FieldRttiImpl(fieldSignature, thisInstance, targetInstance);
                fieldInfo = JavaFieldInfo.getFieldInfo(field);
                ctx = new ExpressionContext(PointcutType.GET, fieldInfo, null);
                for (int i = 0; i < aspectManagers.length; i++) {
View Full Code Here

            final int fieldHash, final int joinPointType,
            final Class declaringClass, final AdviceIndexInfo[] adviceIndexes,
            final JoinPointMetaData joinPointMetaData, final Object thisInstance,
            final Object targetInstance) {
        Field field = AspectRegistry.getField(declaringClass, fieldHash);
        FieldSignatureImpl signature = new FieldSignatureImpl(declaringClass, field);
        Rtti rtti = new FieldRttiImpl(signature, thisInstance, targetInstance);
        return new FieldJoinPoint(
                joinPointType, m_targetClass, signature, rtti, joinPointMetaData,
                createAroundAdviceExecutor(adviceIndexes, joinPointType),
                createBeforeAdviceExecutor(adviceIndexes), createAfterAdviceExecutor(adviceIndexes)
View Full Code Here

        return new MethodSignatureImpl(methodTuple.getDeclaringClass(), methodTuple);
    }

    public static final Signature newFieldSignature(final Class declaringClass, final int joinPointHash) {
        Field field = AspectRegistry.getField(declaringClass, joinPointHash);
        return new FieldSignatureImpl(field.getDeclaringClass(), field);
    }
View Full Code Here

                tuple.cflowExpressions = cflowExpressionList;
                tuple.expressionContext = ctx;
                break;
            case JoinPointType.FIELD_SET:
                Field field = AspectRegistry.getField(declaringClass, joinPointHash);
                FieldSignatureImpl fieldSignature = new FieldSignatureImpl(field.getDeclaringClass(), field);
                tuple.signature = fieldSignature;
                tuple.rtti = new FieldRttiImpl(fieldSignature, thisInstance, targetInstance);
                FieldInfo fieldInfo = JavaFieldInfo.getFieldInfo(field);
                withinInfo = JavaClassInfo.getClassInfo(targetClass);
                ctx = new ExpressionContext(PointcutType.SET, fieldInfo, withinInfo);//AVAJ
                for (int i = 0; i < aspectManagers.length; i++) {
                    for (Iterator it = aspectManagers[i].getPointcuts(ctx).iterator(); it.hasNext();) {
                        Pointcut pointcut = (Pointcut) it.next();
                        if (pointcut.getExpressionInfo().hasCflowPointcut()) {
                            cflowExpressionList.add(pointcut.getExpressionInfo().getCflowExpressionRuntime());
                        }
                    }
                }
                tuple.cflowExpressions = cflowExpressionList;
                tuple.expressionContext = ctx;
                break;
            case JoinPointType.FIELD_GET:
                field = AspectRegistry.getField(declaringClass, joinPointHash);
                fieldSignature = new FieldSignatureImpl(field.getDeclaringClass(), field);
                tuple.signature = fieldSignature;
                tuple.rtti = new FieldRttiImpl(fieldSignature, thisInstance, targetInstance);
                fieldInfo = JavaFieldInfo.getFieldInfo(field);
                withinInfo = JavaClassInfo.getClassInfo(targetClass);
                ctx = new ExpressionContext(PointcutType.GET, fieldInfo, withinInfo);//AVAJ
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.joinpoint.impl.FieldSignatureImpl

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.