Package org.aspectj.weaver

Examples of org.aspectj.weaver.ResolvedMemberImpl


    ret.setGenericSignatureInformationProvider(createGenericSignatureProvider(inWorld));
    return ret;
  }

  public static ResolvedMember createStaticInitMember(Class forType, World inWorld) {
    return new ResolvedMemberImpl(org.aspectj.weaver.Member.STATIC_INITIALIZATION, toResolvedType(forType,
        (IReflectionWorld) inWorld), Modifier.STATIC, ResolvedType.VOID, "<clinit>", new UnresolvedType[0],
        new UnresolvedType[0]);
  }
View Full Code Here


      }
    }
    // Member signature = ReflectionBasedReferenceTypeDelegateFactory.createStaticInitMember(forType, inWorld);
    Kind kind = Shadow.StaticInitialization;
    if (clinit == -1) {
      Member clinitMember = new ResolvedMemberImpl(org.aspectj.weaver.Member.STATIC_INITIALIZATION, forType, Modifier.STATIC,
          ResolvedType.VOID, "<clinit>", new UnresolvedType[0], new UnresolvedType[0]);
      return new StandardShadow(inWorld, kind, clinitMember, null, forType, null, withContext);
    } else {
      return new StandardShadow(inWorld, kind, members[clinit], null, forType, null, withContext);
    }
View Full Code Here

      InstructionHandle startOfHandler, BcelShadow enclosingShadow) {
    InstructionList body = enclosingMethod.getBody();
    UnresolvedType catchType = exceptionRange.getCatchType();
    UnresolvedType inType = enclosingMethod.getEnclosingClass().getType();

    ResolvedMemberImpl sig = MemberImpl.makeExceptionHandlerSignature(inType, catchType);
    sig.setParameterNames(new String[] { findHandlerParamName(startOfHandler) });

    BcelShadow s = new BcelShadow(world, ExceptionHandler, sig, enclosingMethod, enclosingShadow);
    ShadowRange r = new ShadowRange(body);
    r.associateWithShadow(s);
    InstructionHandle start = Range.genStart(body, startOfHandler);
View Full Code Here

    if (ret == null) {
      int mods = mg.getAccessFlags();
      if (mg.getEnclosingClass().isInterface()) {
        mods |= Modifier.INTERFACE;
      }
      return new ResolvedMemberImpl(kind, UnresolvedType.forName(mg.getClassName()), mods, fromBcel(mg.getReturnType()),
          mg.getName(), fromBcel(mg.getArgumentTypes()));
    } else {
      return ret;
    }
View Full Code Here

    int pos = 0;

    ResolvedMember whatToBridgeTo = whatToBridgeToMethodGen.getMemberView();

    if (whatToBridgeTo == null) {
      whatToBridgeTo = new ResolvedMemberImpl(Member.METHOD, whatToBridgeToMethodGen.getEnclosingClass().getType(),
          whatToBridgeToMethodGen.getAccessFlags(), whatToBridgeToMethodGen.getName(),
          whatToBridgeToMethodGen.getSignature());
    }
    // The bridge method in this type will have the same signature as the one in the supertype
    LazyMethodGen bridgeMethod = makeBridgeMethod(clazz, theBridgeMethod);
View Full Code Here

        if (adviceSignature instanceof BcelMethod) {
          BcelMethod bm = (BcelMethod) adviceSignature;
          if (bm.getMethod() != null && bm.getMethod().getAnnotations() != null) {
            return adviceSignature;
          }
          ResolvedMemberImpl simplermember = new ResolvedMemberImpl(bm.getKind(), bm.getDeclaringType(),
              bm.getModifiers(), bm.getReturnType(), bm.getName(), bm.getParameterTypes());// ,bm.getExceptions(),bm.getBackingGenericMember()
          // );
          simplermember.setParameterNames(bm.getParameterNames());
          return simplermember;
        }
      }
    }
    return adviceSignature;
View Full Code Here

    ret.setGenericSignatureInformationProvider(createGenericSignatureProvider(inWorld));
    return ret;
  }

  public static ResolvedMember createHandlerMember(Class exceptionType, Class inType, World inWorld) {
    return new ResolvedMemberImpl(org.aspectj.weaver.Member.HANDLER, toResolvedType(inType, (IReflectionWorld) inWorld),
        Modifier.STATIC, "<catch>", "(" + inWorld.resolve(exceptionType.getName()).getSignature() + ")V");
  }
View Full Code Here

   */
  public ResolvedMemberImpl makeResolvedMemberForITD(MethodBinding binding, TypeBinding declaringType, Map /*
                                                       * TypeVariableBinding >
                                                       * original alias name
                                                       */recoveryAliases) {
    ResolvedMemberImpl result = null;
    try {
      typeVariablesForAliasRecovery = recoveryAliases;
      result = makeResolvedMember(binding, declaringType);
    } finally {
      typeVariablesForAliasRecovery = null;
View Full Code Here

    // AMC these next two lines shouldn't be needed once we sort out generic types properly in the world map
    ResolvedType realDeclaringType = world.resolve(fromBinding(declaringType));
    if (realDeclaringType.isRawType()) {
      realDeclaringType = realDeclaringType.getGenericType();
    }
    ResolvedMemberImpl ret = new EclipseResolvedMember(binding, memberKind, realDeclaringType, binding.modifiers,
        fromBinding(binding.returnType), new String(binding.selector), fromBindings(binding.parameters),
        fromBindings(binding.thrownExceptions), this);
    if (binding.isVarargs()) {
      ret.setVarargsMethod();
    }
    if (ajTypeRefs != null) {
      TypeVariable[] tVars = new TypeVariable[ajTypeRefs.length];
      for (int i = 0; i < ajTypeRefs.length; i++) {
        tVars[i] = ((TypeVariableReference) ajTypeRefs[i]).getTypeVariable();
      }
      ret.setTypeVariables(tVars);
    }
    typeVariablesForThisMember.clear();
    ret.resolve(world);
    return ret;
  }
View Full Code Here

    // AMC these next two lines shouldn't be needed once we sort out generic types properly in the world map
    ResolvedType realDeclaringType = world.resolve(fromBinding(receiverType));
    if (realDeclaringType.isRawType()) {
      realDeclaringType = realDeclaringType.getGenericType();
    }
    ResolvedMemberImpl ret = new EclipseResolvedMember(binding, Member.FIELD, realDeclaringType, binding.modifiers,
        world.resolve(fromBinding(binding.type)), new String(binding.name), UnresolvedType.NONE);
    return ret;
  }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.ResolvedMemberImpl

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.