Package org.aspectj.weaver

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


      // return type for the specific declaration at the shadow. (FastCar Sub.getCar())
      // XXX Put out another XLINT in this case?
      return;
    }
    // PR60015 - Don't report the warning if the declaring type is object and 'this' is an interface
    if (exactDeclaringType.resolve(world).isInterface() && shadowDeclaringType.equals(world.resolve("java.lang.Object"))) {
      return;
    }

    SignaturePattern nonConfusingPattern = new SignaturePattern(signature.getKind(), signature.getModifiers(),
        signature.getReturnType(), TypePattern.ANY, signature.getName(), signature.getParameterTypes(),
View Full Code Here


    if (kind == Shadow.ConstructorExecution) { // Bug fix 60936
      if (signature.getDeclaringType() != null) {
        World world = scope.getWorld();
        UnresolvedType exactType = signature.getDeclaringType().getExactType();
        if (signature.getKind() == Member.CONSTRUCTOR && !ResolvedType.isMissing(exactType)
            && exactType.resolve(world).isInterface() && !signature.getDeclaringType().isIncludeSubtypes()) {
          world.getLint().noInterfaceCtorJoinpoint.signal(exactType.toString(), getSourceLocation());
        }
      }
    }
View Full Code Here

      UnresolvedType mtmbgoParameter = methodThatMightBeGettingOverridden.getParameterTypes()[p];
      UnresolvedType ptype = methodParamsArray[p];

      if (mtmbgoParameter.isTypeVariableReference()) {
        if (!mtmbgoParameter.resolve(w).isAssignableFrom(ptype.resolve(w))) {
          sameParams = false;
        }
      } else {
        // old condition:
        boolean b = !methodThatMightBeGettingOverridden.getParameterTypes()[p].getErasureSignature().equals(
View Full Code Here

      if (methodName.startsWith("ajc$inlineAccessMethod") || methodName.startsWith("ajc$superDispatch")) {
        ResolvedMember resolvedDooberry = world.resolve(declaredSig);
        pnames = resolvedDooberry.getParameterNames();
      } else {
        ResolvedMember realthing = AjcMemberMaker.interMethodDispatcher(rm.resolve(world), memberHostType).resolve(world);
        ResolvedMember theRealMember = findResolvedMemberNamed(memberHostType.resolve(world), realthing.getName());
        if (theRealMember != null) {
          pnames = theRealMember.getParameterNames();
          // static ITDs don't need any parameter shifting
          if (pnames.length > 0 && pnames[0].equals("ajc$this_")) {
            String[] pnames2 = new String[pnames.length - 1];
View Full Code Here

            ResolvedMember resolvedDooberry = world.resolve(declaredSig);
            annotations = resolvedDooberry.getAnnotationTypes();
          } else {
            ResolvedMember realthing = AjcMemberMaker.interMethodDispatcher(rm.resolve(world), memberHostType).resolve(
                world);
            ResolvedMember theRealMember = findResolvedMemberNamed(memberHostType.resolve(world), realthing.getName(),
                realthing.getParameterTypes());
            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");
            }
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()),
        BcelWorld.makeBcelTypes(signature.getParameterTypes()), kind);
  }
View Full Code Here

          if (ut.isTypeVariableReference()) {
            continueCheck = false;
          }

          // System.err.println("Verifying "+ut.getName()+" meets bounds for "+tvs[i]);
          if (continueCheck && !tvs[i].canBeBoundTo(ut.resolve(scope.getWorld()))) {
            // issue message that type parameter does not meet specification
            String parameterName = ut.getName();
            if (ut.isTypeVariableReference()) {
              parameterName = ((TypeVariableReference) ut).getTypeVariable().getDisplayName();
            }
View Full Code Here

    // optimization for case of this(Object) or target(Object)
    // works for an ExactTypePattern (and we know there are no annotations to match here of course)
    if (typePattern.getExactType().equals(ResolvedType.OBJECT)) {
      return FuzzyBoolean.YES;
    }
    return typePattern.matches(typeToMatch.resolve(shadow.getIWorld()), TypePattern.DYNAMIC);
  }

  @Override
  public void write(CompressingDataOutputStream s) throws IOException {
    s.writeByte(Pointcut.THIS_OR_TARGET);
View Full Code Here

            // class names in constant pool use '/' instead of '.', from JVM Spec 2nd ed. par. 4.2
            String outerClsName = cpool.getConstantUtf8(outerClsInfo.getNameIndex()).getValue().replace('/', '.');

            UnresolvedType outer = UnresolvedType.forName(outerClsName);
            return outer.resolve(getResolvedTypeX().getWorld());
          }
        }
      }
    }
View Full Code Here

        EnclosingMethod enclosingMethodAttribute = (EnclosingMethod) attr;
        if (enclosingMethodAttribute.getEnclosingClassIndex() != 0) {
          ConstantClass outerClassInfo = enclosingMethodAttribute.getEnclosingClass();
          String outerClassName = cpool.getConstantUtf8(outerClassInfo.getNameIndex()).getValue().replace('/', '.');
          UnresolvedType outer = UnresolvedType.forName(outerClassName);
          return outer.resolve(getResolvedTypeX().getWorld());
        }
      }
    }

    // try finding outer class name by assuming standard class name mangling convention of javac for this class
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.