Package org.aspectj.weaver

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


    // try finding outer class name by assuming standard class name mangling convention of javac for this class
    int lastDollar = className.lastIndexOf('$');
    String superClassName = className.substring(0, lastDollar);
    UnresolvedType outer = UnresolvedType.forName(superClassName);
    return outer.resolve(getResolvedTypeX().getWorld());
  }

  private void ensureGenericInfoProcessed() {
    if ((bitflag & DISCOVERED_DECLARED_SIGNATURE) != 0) {
      return;
View Full Code Here


                  "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(
View Full Code Here

            il.append(InstructionConstants.ACONST_NULL);
          }
        }
      } else {
        UnresolvedType desiredTy = getBindingParameterTypes()[i];
        v.appendLoadAndConvert(il, fact, desiredTy.resolve(world));
      }
    }

    // ATAJ: for code style aspect, handles the extraFlag as usual ie not
    // in the middle of the formal bindings but at the end, in a rock solid ordering
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() });
          // IMessage msg = new Message(
View Full Code Here

      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

      boolean reportProblem = false;
      if (parameterTypes[i].isTypeVariableReference() && p.getExactType().isTypeVariableReference()) {
        UnresolvedType One = ((TypeVariableReference) parameterTypes[i]).getTypeVariable().getFirstBound();
        UnresolvedType Two = ((TypeVariableReference) p.getExactType()).getTypeVariable().getFirstBound();
        reportProblem = !One.resolve(scope.getWorld()).isAssignableFrom(Two.resolve(scope.getWorld()));
      } else {
        reportProblem = !p.matchesSubtypes(parameterTypes[i]) && !p.getExactType().equals(UnresolvedType.OBJECT);
      }
      if (reportProblem) {
        scope.message(IMessage.ERROR, this, "incompatible type, expected " + parameterTypes[i].getName() + " found " + p
View Full Code Here

        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;
        }
      }
    }
View Full Code Here

    }

    if (alwaysMatches && (annVar == null)) {// change check to verify if its the 'generic' annVar that is being used
      return Literal.TRUE;
    } else {
      ResolvedType rType = annotationType.resolve(shadow.getIWorld());
      return Test.makeHasAnnotation(var, rType);
    }
  }

  private boolean couldMatch(Shadow shadow) {
View Full Code Here

          BcelVar tmp = genTempVar(type, "ajc$arg" + i);
          range.insert(tmp.createCopyFrom(fact, index), Range.OutsideBefore);
          argVars[i] = tmp;
          tmp.setPositionInAroundState(i + positionOffset);
        }
        index += type.resolve(world).getSize();
      }
    }
    allArgVarsInitialized = true;

  }
View Full Code Here

      ResolvedMember foundMember = findMethod2(relevantType.getDeclaredMethods(), getSignature());
      annotations = getAnnotations(foundMember, shadowSignature, relevantType);
      annotationHolder = getRelevantMember(foundMember, annotationHolder, relevantType);
      UnresolvedType ut = annotationHolder.getDeclaringType();
      relevantType = ut.resolve(world);

    } else if (getKind() == Shadow.ExceptionHandler) {
      relevantType = getSignature().getParameterTypes()[0].resolve(world);
      annotations = relevantType.getAnnotationTypes();
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.