Package org.codehaus.aspectwerkz.reflect

Examples of org.codehaus.aspectwerkz.reflect.ReflectionInfo




    public Object visit(ASTModifier node, Object data) {

        ReflectionInfo refInfo = (ReflectionInfo) data;

        int modifiersToMatch = refInfo.getModifiers();

        int modifierPattern = node.getModifier();

        if (node.isNot()) {
View Full Code Here


     */

    private int getParametersCount(final ExpressionContext ctx) {

        ReflectionInfo reflectionInfo = ctx.getReflectionInfo();

        if (reflectionInfo instanceof MethodInfo) {

            return ((MethodInfo) reflectionInfo).getParameterTypes().length;

View Full Code Here

        AspectSystem system = SystemLoader.getSystem(calleeClass.getClassLoader());
        system.initialize();

        ClassInfo calleeClassInfo = JavaClassInfo.getClassInfo(calleeClass);
        ReflectionInfo reflectionInfo = null;

        switch (joinPointType) {
            case JoinPointType.METHOD_EXECUTION:
                reflectionInfo = calleeClassInfo.getMethod(joinPointHash);
                doLoadJoinPoint(
View Full Code Here

                                        final ReflectionInfo reflectionInfo,
                                        final AspectSystem system,
                                        final ClassInfo thisClassInfo) {

        ClassInfo callerClassInfo = JavaClassInfo.getClassInfo(callerClass);
        ReflectionInfo withinInfo = callerClassInfo.getMethod(
                AsmHelper.calculateMethodHash(callerMethodName, callerMethodDesc)
        );

        JoinPointMetaData metaData = JoinPointMetaData.getJoinPointMetaData(
                pointcutType, system, reflectionInfo, withinInfo
View Full Code Here

        if (!generateJoinPoint) {
            return;
        }

        ClassInfo calleeClassInfo = JavaClassInfo.getClassInfo(calleeClass);
        ReflectionInfo reflectionInfo = null;

        switch (joinPointType) {
            case JoinPointType.METHOD_EXECUTION_INT:
                reflectionInfo = calleeClassInfo.getMethod(joinPointHash);
                doLoadJoinPoint(
View Full Code Here

                joinPointClassName,
                EmittedJoinPoint.NO_LINE_NUMBER
        );

        ClassInfo callerClassInfo = JavaClassInfo.getClassInfo(callerClass);
        ReflectionInfo withinInfo = null;
        // FIXME: refactor getMethodInfo in INFO so that we can apply it on "<init>" and that it delegates to ctor
        // instead of checking things here.
        switch (joinPointType) {
            case JoinPointType.CONSTRUCTOR_EXECUTION_INT:
                withinInfo = callerClassInfo.getConstructor(AsmHelper.calculateConstructorHash(callerMethodDesc));
View Full Code Here

    }

    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

    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

    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

        }
        return Boolean.FALSE;
    }

    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

TOP

Related Classes of org.codehaus.aspectwerkz.reflect.ReflectionInfo

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.