Package org.codehaus.aspectwerkz.reflect

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


        }
    }

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

        }
    }

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

    }

    public Object visit(ASTThis node, Object data) {
        ExpressionContext context = (ExpressionContext) data;
        if (context.hasWithinReflectionInfo()) {
            ReflectionInfo withinInfo = context.getWithinReflectionInfo();
            if (withinInfo instanceof MemberInfo) {
                return Util.booleanValueOf(
                        ClassInfoHelper.instanceOf(
                                ((MemberInfo) withinInfo).getDeclaringType(),
                                node.getBoundedType(m_expressionInfo)
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 = null;
        // FIXME: refactor getMethod 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:
                withinInfo = callerClassInfo.getConstructor(AsmHelper.calculateConstructorHash(callerMethodDesc));
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



        if (context.hasStaticInitializationPointcut() && context.hasWithinReflectionInfo()) {

          ReflectionInfo reflectInfo = context.getWithinReflectionInfo();

            if (reflectInfo instanceof StaticInitializationInfo) {

                reflectInfo = ((StaticInitializationInfo) reflectInfo).getDeclaringType();
View Full Code Here

    public Object visit(ASTWithinCode node, Object data) {

        ExpressionContext context = (ExpressionContext) data;

        ReflectionInfo withinInfo = context.getWithinReflectionInfo();



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

        ExpressionContext context = (ExpressionContext) data;

        if (context.hasWithinReflectionInfo()) {

            ReflectionInfo withinInfo = context.getWithinReflectionInfo();

            if (withinInfo instanceof MemberInfo) {

                return Util.booleanValueOf(
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.