Examples of resolve()


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

      relevantType = relevantType.getGenericType();
    }

    // Determine the annotations that are of interest
    if (getKind() == Shadow.StaticInitialization) {
      annotations = relevantType.resolve(world).getAnnotationTypes();
    } else if (getKind() == Shadow.MethodCall || getKind() == Shadow.ConstructorCall) {
      ResolvedMember foundMember = findMethod2(relevantType.resolve(world).getDeclaredMethods(), getSignature());
      annotations = getAnnotations(foundMember, shadowSignature, relevantType);
      annotationHolder = getRelevantMember(foundMember, shadowSignature, relevantType);
      relevantType = annotationHolder.getDeclaringType().resolve(world);
View Full Code Here

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

      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

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

    return !bcelObjectType.isInterface();
  }

  private boolean mungeNewMemberType(BcelClassWeaver classWeaver, NewMemberClassTypeMunger munger) {
    World world = classWeaver.getWorld();
    ResolvedType onType = world.resolve(munger.getTargetType());
    if (onType.isRawType()) {
      onType = onType.getGenericType();
    }
    return onType.equals(classWeaver.getLazyClassGen().getType());
  }
View Full Code Here

Examples of org.aspectj.weaver.bcel.BcelWorld.resolve()

    }

    bcelWeaver.setReweavableMode(buildConfig.isXNotReweavable());

    // check for org.aspectj.runtime.JoinPoint
    ResolvedType joinPoint = bcelWorld.resolve("org.aspectj.lang.JoinPoint");
    if (joinPoint.isMissing()) {
      IMessage message = new Message(
          "classpath error: unable to find org.aspectj.lang.JoinPoint (check that aspectjrt.jar is in your classpath)",
          null, true);
      handler.handleMessage(message);
View Full Code Here

Examples of org.aspectj.weaver.patterns.Declare.resolve()

    for (Iterator<AjAttribute> iter = attributeList.iterator(); iter.hasNext();) {
      AjAttribute a = iter.next();
      if (a instanceof AjAttribute.DeclareAttribute) {
        Declare decl = (((AjAttribute.DeclareAttribute) a).getDeclare());
        if (decl instanceof DeclareErrorOrWarning) {
          decl.resolve(bindingScope);
        } else if (decl instanceof DeclarePrecedence) {
          ((DeclarePrecedence) decl).setScopeForResolution(bindingScope);
        }
      }
    }
View Full Code Here

Examples of org.aspectj.weaver.patterns.DeclareParents.resolve()

          IScope binding = new BindingScope(struct.enclosingType, struct.context, bindings);
          // first add the declare implements like
          List<TypePattern> parents = new ArrayList<TypePattern>(1);
          parents.add(parent);
          DeclareParents dp = new DeclareParents(typePattern, parents, false);
          dp.resolve(binding); // resolves the parent and child parts
          // of the decp

          // resolve this so that we can use it for the
          // MethodDelegateMungers below.
          // eg. '@Coloured *' will change from a WildTypePattern to
View Full Code Here

Examples of org.aspectj.weaver.patterns.DeclareParentsMixin.resolve()

    // Create the declare parents that will add the interfaces to matching targets
    FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
    IScope binding = new BindingScope(struct.enclosingType, struct.context, bindings);
    // how do we mark this as a decp due to decmixin?
    DeclareParents dp = new DeclareParentsMixin(targetTypePattern, newParents);
    dp.resolve(binding);
    targetTypePattern = dp.getChild();

    dp.setLocation(struct.context, -1, -1); // not ideal...
    struct.ajAttributes.add(new AjAttribute.DeclareAttribute(dp));
View Full Code Here

Examples of org.aspectj.weaver.patterns.ExactTypePattern.resolve()

            if (decpPattern != null) {
                TypePattern typePattern = parseTypePattern(decpPattern, struct);
                ResolvedType fieldType = UnresolvedType.forSignature(struct.field.getSignature()).resolve(struct.enclosingType.getWorld());
                if (fieldType.isInterface()) {
                    TypePattern parent = new ExactTypePattern(UnresolvedType.forSignature(struct.field.getSignature()), false, false);
                    parent.resolve(struct.enclosingType.getWorld());
                    // first add the declare implements like
                    List parents = new ArrayList(1); parents.add(parent);
                    DeclareParents dp = new DeclareParents(
                            typePattern,
                            parents,
View Full Code Here

Examples of org.aspectj.weaver.patterns.Pointcut.resolve()

        } else {
          pc = parsePointcut(beforeAdvice.getValue().stringifyValue(), struct, false);
          if (pc == null) {
            return false;// parse error
          }
          pc = pc.resolve(binding);
        }
        setIgnoreUnboundBindingNames(pc, bindings);

        ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
            struct.bMethod.getDeclarationOffset());
View Full Code Here

Examples of org.aspectj.weaver.patterns.TypePattern.resolve()

    public void addScopedAspect(String aspectName, String scope) {
      ensureInitialized();
      resolvedIncludedAspects.add(aspectName);
      try {
        TypePattern scopePattern = new PatternParser(scope).parseTypePattern();
        scopePattern.resolve(world);
        scopes.put(aspectName, scopePattern);
        if (!world.getMessageHandler().isIgnoring(IMessage.INFO)) {
          world.getMessageHandler().handleMessage(
              MessageUtil.info("Aspect '" + aspectName + "' is scoped to apply against types matching pattern '"
                  + scopePattern.toString() + "'"));
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.