Examples of ReflectionInfo


Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo

    }

    public Object visit(ASTWithin node, Object data) {
        ExpressionContext context = (ExpressionContext) data;
        if (context.hasWithinReflectionInfo()) {
            ReflectionInfo withinInfo = context.getWithinReflectionInfo();
            if (withinInfo instanceof MemberInfo) {
                return node.jjtGetChild(0).jjtAccept(this, ((MemberInfo) withinInfo).getDeclaringType());
            } else if (withinInfo instanceof ClassInfo) {
                return node.jjtGetChild(0).jjtAccept(this, withinInfo);
            }
View Full Code Here

Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo

    public Object visit(ASTHasMethod node, Object data) {
        ExpressionContext context = (ExpressionContext) data;

        // we are matching on the CALLER info
        // for execution() pointcut, this is equals to CALLEE info
        ReflectionInfo info = context.getWithinReflectionInfo();
        ClassInfo classInfo = (info instanceof MemberInfo) ?
                              ((MemberInfo) info).getDeclaringType() : (ClassInfo) info;

        Node childNode = node.jjtGetChild(0);
        MethodInfo[] methodInfos = classInfo.getMethods();
View Full Code Here

Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo

    public Object visit(ASTHasField node, Object data) {
        ExpressionContext context = (ExpressionContext) data;

        // we are matching on the CALLER info
        // for execution() pointcut, this is equals to CALLEE info
        ReflectionInfo info = context.getWithinReflectionInfo();
        ClassInfo classInfo = (info instanceof MemberInfo) ?
                              ((MemberInfo) info).getDeclaringType() : (ClassInfo) info;

        Node childNode = node.jjtGetChild(0);
        FieldInfo[] fieldInfos = classInfo.getFields();
View Full Code Here

Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo

        return Boolean.FALSE;
    }

    public Object visit(ASTTarget node, Object data) {
        ExpressionContext context = (ExpressionContext) data;
        ReflectionInfo info = context.getReflectionInfo();

//        //TODO - seems to be the case for AJ - not intuitive
//        if (info instanceof ConstructorInfo) {
//            // target(..) does not match for constructors
//            return Boolean.FALSE;
View Full Code Here

Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo

    public Object visit(ASTThis node, Object data) {
        ExpressionContext context = (ExpressionContext) data;
        // for execution pointcut, this(..) is used to match the callee info
        // and we are assuming here that withinInfo is properly set to reflectionInfo
        if (context.hasWithinReflectionInfo()) {
            ReflectionInfo withinInfo = context.getWithinReflectionInfo();
            if (withinInfo instanceof MemberInfo) {
                // if method is static (callee for execution or caller for call/get/set), this(..) is evaluated to false
                if (Modifier.isStatic(((MemberInfo) withinInfo).getModifiers())) {
                    return Boolean.FALSE;
                }
View Full Code Here

Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo

            return Util.booleanValueOf(matchAnnotation);
        }
    }

    public Object visit(ASTModifier node, Object data) {
        ReflectionInfo refInfo = (ReflectionInfo) data;
        int modifiersToMatch = refInfo.getModifiers();
        int modifierPattern = node.getModifier();
        if (node.isNot()) {
            if ((modifierPattern & Modifier.PUBLIC) != 0) {
                if (((modifiersToMatch & Modifier.PUBLIC) == 0)) {
                    return Boolean.TRUE;
View Full Code Here

Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo

     *
     * @param ctx
     * @return
     */
    private int getParametersCount(final ExpressionContext ctx) {
        ReflectionInfo reflectionInfo = ctx.getReflectionInfo();
        if (reflectionInfo instanceof MethodInfo) {
            return ((MethodInfo) reflectionInfo).getParameterTypes().length;
        } else if (reflectionInfo instanceof ConstructorInfo) {
            return ((ConstructorInfo) reflectionInfo).getParameterTypes().length;
        } else if (reflectionInfo instanceof FieldInfo) {
View Full Code Here

Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo

        ExpressionContext context = (ExpressionContext) data;

        if (context.hasWithinReflectionInfo()) {

            ReflectionInfo withinInfo = context.getWithinReflectionInfo();

            if (withinInfo instanceof MemberInfo) {

                return node.jjtGetChild(0).jjtAccept(this, ((MemberInfo) withinInfo).getDeclaringType());
View Full Code Here

Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo

        // we are matching on the CALLER info

        // for execution() pointcut, this is equals to CALLEE info

        ReflectionInfo info = context.getWithinReflectionInfo();

        ClassInfo classInfo = (info instanceof MemberInfo) ?

            ((MemberInfo)info).getDeclaringType() : (ClassInfo)info;
View Full Code Here

Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo

        // we are matching on the CALLER info

        // for execution() pointcut, this is equals to CALLEE info

        ReflectionInfo info = context.getWithinReflectionInfo();

        ClassInfo classInfo = (info instanceof MemberInfo) ?

            ((MemberInfo)info).getDeclaringType() : (ClassInfo)info;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.