Package org.aspectj.weaver

Examples of org.aspectj.weaver.UnresolvedType.resolve()


          ResolvedMember resolvedDooberry = world.resolve(declaredSig);
          annotations = resolvedDooberry.getAnnotationTypes();
        } else {
          ResolvedMember realthing = AjcMemberMaker.interMethodDispatcher(rm.resolve(world),memberHostType).resolve(world);
          // ResolvedMember resolvedDooberry = world.resolve(realthing);
          ResolvedMember theRealMember = findResolvedMemberNamed(memberHostType.resolve(world),realthing.getName());
          // AMC temp guard for M4
          if (theRealMember == null) {
            throw new UnsupportedOperationException("Known limitation in M4 - can't find ITD members when type variable is used as an argument and has upper bound specified");
          }
          annotations = theRealMember.getAnnotationTypes();
View Full Code Here


            throw new UnsupportedOperationException("Known limitation in M4 - can't find ITD members when type variable is used as an argument and has upper bound specified");
          }
          annotations = theRealMember.getAnnotationTypes();
        }
      } else if (rm.getKind()==Member.CONSTRUCTOR) {
        ResolvedMember realThing = AjcMemberMaker.postIntroducedConstructor(memberHostType.resolve(world),rm.getDeclaringType(),rm.getParameterTypes());
        ResolvedMember resolvedDooberry = world.resolve(realThing);
        // AMC temp guard for M4
        if (resolvedDooberry == null) {
          throw new UnsupportedOperationException("Known limitation in M4 - can't find ITD members when type variable is used as an argument and has upper bound specified");
        }
View Full Code Here

      } else {
        // match the argument type at argsIndex with the ExactAnnotationTypePattern
        // we know it is exact because nothing else is allowed in args
        ExactAnnotationTypePattern ap = (ExactAnnotationTypePattern)arguments.get(i);
        UnresolvedType argType = shadow.getArgType(argsIndex);
        ResolvedType rArgType = argType.resolve(shadow.getIWorld());
        if (rArgType.isMissing()) {
          shadow.getIWorld().getLint().cantFindType.signal(
              new String[] {WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_ARG_TYPE,argType.getName())},
              shadow.getSourceLocation(),
              new ISourceLocation[]{getSourceLocation()}
View Full Code Here

  }
 
  private ResolvedType maybeGetNewParent(ResolvedType targetType, TypePattern typePattern, World world,boolean reportErrors) {
    if (typePattern == TypePattern.NO) return null// already had an error here
    UnresolvedType iType = typePattern.getExactType();
    ResolvedType parentType = iType.resolve(world);
   
    if (targetType.equals(world.getCoreType(UnresolvedType.OBJECT))) {
      world.showMessage(IMessage.ERROR,
          WeaverMessages.format(WeaverMessages.DECP_OBJECT),
              this.getSourceLocation(), null);
View Full Code Here

            kind = Constants.INVOKEVIRTUAL;
        }

        UnresolvedType targetType = signature.getDeclaringType();
        if (targetType.isParameterizedType()) {
          targetType = targetType.resolve(world).getGenericType();
        }
        return fact.createInvoke(
            targetType.getName(),
            signature.getName(),
            BcelWorld.makeBcelType(signature.getReturnType()),
View Full Code Here

        if (!checkReturnType) return true;
        ResolvedMember rm = type.lookupMethod(member);
        if (rm==nullrm = type.lookupMethodInITDs(member); // It must be in here, or we have *real* problems
        if (rm==null) continue; // might be currently looking at the generic type and we need to continue searching in case we hit a parameterized version of this same type...
        UnresolvedType returnTypeX = rm.getReturnType();
        ResolvedType returnType = returnTypeX.resolve(world);
        if (returnTypePattern.matchesStatically(returnType)) return true;
      }
    }
    return false;
  }
View Full Code Here

    // if we're not a static reference, then do a lookup of outers
    if (pointcutDef == null && onType == null) {
      while (true) {
        UnresolvedType declaringType = searchType.getDeclaringType();
        if (declaringType == null) break;
        searchType = declaringType.resolve(scope.getWorld());
        pointcutDef = searchType.findPointcut(name);
        if (pointcutDef != null) {
          // make this a static reference
          onType = searchType;
          break;
View Full Code Here

    ResolvedType shadowDeclaringType =
      shadow.getSignature().getDeclaringType().resolve(world);
       
    if (signature.getDeclaringType().isStar()
      || ResolvedType.isMissing(exactDeclaringType)
      || exactDeclaringType.resolve(world).isMissing())
      return;

        // warning not needed if match type couldn't ever be the declaring type
    if (!shadowDeclaringType.isAssignableFrom(exactDeclaringType.resolve(world))) {
            return;
View Full Code Here

      || ResolvedType.isMissing(exactDeclaringType)
      || exactDeclaringType.resolve(world).isMissing())
      return;

        // warning not needed if match type couldn't ever be the declaring type
    if (!shadowDeclaringType.isAssignableFrom(exactDeclaringType.resolve(world))) {
            return;
    }

    // if the method in the declaring type is *not* visible to the
    // exact declaring type then warning not needed.
View Full Code Here

    int shadowModifiers = rm.getModifiers();
    if (!ResolvedType
      .isVisible(
        shadowModifiers,
        shadowDeclaringType,
        exactDeclaringType.resolve(world))) {
      return;
    }
   
    if (!signature.getReturnType().matchesStatically(shadow.getSignature().getReturnType().resolve(world))) {
      // Covariance issue...
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.