Package org.aspectj.bridge

Examples of org.aspectj.bridge.ISourceLocation


    writeOutTypeAliases(s);
    s.writeInt(version);
  }

  public static ResolvedTypeMunger readField(VersionedDataInputStream s, ISourceContext context) throws IOException {
    ISourceLocation sloc = null;
    ResolvedMember fieldSignature = ResolvedMemberImpl.readResolvedMember(s, context);
    Set superMethodsCalled = readSuperMethodsCalled(s);
    sloc = readSourceLocation(s);
    List aliases = readInTypeAliases(s);
    NewFieldTypeMunger munger = new NewFieldTypeMunger(fieldSignature, superMethodsCalled, aliases);
View Full Code Here


      getAllStructureChildren(fileNode, peNodes, showSubMember, showMemberAndType);
      for (Iterator it = peNodes.iterator(); it.hasNext();) {
        IProgramElement peNode = (IProgramElement) it.next();
        List entries = new ArrayList();
        entries.add(peNode);
        ISourceLocation sourceLoc = peNode.getSourceLocation();
        if (null != sourceLoc) {
          Integer hash = new Integer(sourceLoc.getLine());
          List existingEntry = (List) annotations.get(hash);
          if (existingEntry != null) {
            entries.addAll(existingEntry);
          }
          annotations.put(hash, entries);
View Full Code Here

          }
          pc = pc.resolve(binding);
        }
        setIgnoreUnboundBindingNames(pc, bindings);

        ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
            struct.bMethod.getDeclarationOffset());
        struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.Before, pc, extraArgument, sl.getOffset(), sl
            .getOffset() + 1,// FIXME AVASM
            struct.context));
        return true;
      }
    }
View Full Code Here

          }
          pc.resolve(binding);
        }
        setIgnoreUnboundBindingNames(pc, bindings);

        ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
            struct.bMethod.getDeclarationOffset());
        struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.After, pc, extraArgument, sl.getOffset(), sl
            .getOffset() + 1,// FIXME AVASM
            struct.context));
        return true;
      }
    }
View Full Code Here

        }
        pc.resolve(binding);
      }
      setIgnoreUnboundBindingNames(pc, bindings);

      ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
          struct.bMethod.getDeclarationOffset());
      struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.AfterReturning, pc, extraArgument, sl.getOffset(),
          sl.getOffset() + 1,// FIXME AVASM
          struct.context));
      return true;
    }
    return false;
  }
View Full Code Here

        }
        pc.resolve(binding);
      }
      setIgnoreUnboundBindingNames(pc, bindings);

      ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
          struct.bMethod.getDeclarationOffset());
      struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.AfterThrowing, pc, extraArgument, sl.getOffset(), sl
          .getOffset() + 1, struct.context));
      return true;
    }
    return false;
  }
View Full Code Here

          }
          pc.resolve(binding);
        }
        setIgnoreUnboundBindingNames(pc, bindings);

        ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
            struct.bMethod.getDeclarationOffset());
        struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.Around, pc, extraArgument, sl.getOffset(), sl
            .getOffset() + 1,// FIXME AVASM
            struct.context));
        return true;
      }
    }
View Full Code Here

  private static void setDeclareErrorOrWarningLocation(AsmManager model, DeclareErrorOrWarning deow, AjAttributeFieldStruct struct) {
    IHierarchy top = (model == null ? null : model.getHierarchy());
    if (top != null && top.getRoot() != null) {
      IProgramElement ipe = top.findElementForLabel(top.getRoot(), IProgramElement.Kind.FIELD, struct.field.getName());
      if (ipe != null && ipe.getSourceLocation() != null) {
        ISourceLocation sourceLocation = ipe.getSourceLocation();
        int start = sourceLocation.getOffset();
        int end = start + struct.field.getName().length();
        deow.setLocation(struct.context, start, end);
        return;
      }
    }
View Full Code Here

  /**
   * Get a source location for the munger. Until intertype mungers remember where they came from, the source location for the
   * munger itself is null. In these cases use the source location for the aspect containing the ITD.
   */
  private ISourceLocation getMungerLocation(ConcreteTypeMunger munger) {
    ISourceLocation sloc = munger.getSourceLocation();
    if (sloc == null) {
      sloc = munger.getAspectType().getSourceLocation();
    }
    return sloc;
  }
View Full Code Here

              if (!isDuplicateOfPreviousITD) {
                // b275032 - this is OK if it is the default ctor and that default ctor was generated
                // at compile time, otherwise we cannot overwrite it
                if (!(typeTransformerSignature.getName().equals("<init>") && existingMember.isDefaultConstructor())) {
                  String aspectName = typeTransformer.getAspectType().getName();
                  ISourceLocation typeTransformerLocation = typeTransformer.getSourceLocation();
                  ISourceLocation existingMemberLocation = existingMember.getSourceLocation();
                  IMessage errorMessage = null;
                  String msg = WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, aspectName,
                      existingMember);

                  // this isn't quite right really... as I think the errors should only be recorded against
View Full Code Here

TOP

Related Classes of org.aspectj.bridge.ISourceLocation

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.