Package org.aspectj.weaver.bcel

Examples of org.aspectj.weaver.bcel.UnwovenClassFile


  public InterimCompilationResult(CompilationResult cr, List<UnwovenClassFile> ucfList) {
    result = cr;
    unwovenClassFiles = new UnwovenClassFile[ucfList.size()];
    for (int i = 0; i < ucfList.size(); i++) {
      UnwovenClassFile element = ucfList.get(i);
      unwovenClassFiles[i] = element;
      AjClassFile ajcf = new AjClassFile(element.getClassNameAsChars(), element.getBytes());
      result.record(ajcf.fileName(), ajcf);
    }
  }
View Full Code Here


        // add each class file in an in-dir individually, this gives us the best error reporting
        // (they are like 'source' files then), and enables a cleaner incremental treatment of
        // class file changes in indirs.
        File[] binSrcs = FileUtil.listFiles(inPathElement, binarySourceFilter);
        for (int j = 0; j < binSrcs.length; j++) {
          UnwovenClassFile ucf = bcelWeaver.addClassFile(binSrcs[j], inPathElement, outputDir);
          List<UnwovenClassFile> ucfl = new ArrayList<UnwovenClassFile>();
          ucfl.add(ucf);
          state.recordBinarySource(binSrcs[j].getPath(), ucfl);
        }
      }
View Full Code Here

      List<BinarySourceFile> addedOrModified = new ArrayList<BinarySourceFile>();
      addedOrModified.addAll(addedBinaryFiles);
      addedOrModified.addAll(getModifiedBinaryFiles());
      for (Iterator<BinarySourceFile> iter = addedOrModified.iterator(); iter.hasNext();) {
        AjBuildConfig.BinarySourceFile bsf = iter.next();
        UnwovenClassFile ucf = createUnwovenClassFile(bsf);
        if (ucf == null) {
          continue;
        }
        List<UnwovenClassFile> ucfs = new ArrayList<UnwovenClassFile>();
        ucfs.add(ucf);
        recordTypeChanged(ucf.getClassName());
        binarySourceFiles.put(bsf.binSrc.getPath(), ucfs);
        List<ClassFile> cfs = new ArrayList<ClassFile>(1);
        cfs.add(getClassFileFor(ucf));
        this.inputClassFilesBySource.put(bsf.binSrc.getPath(), cfs);
        toWeave.put(bsf.binSrc.getPath(), ucfs);
View Full Code Here

    weaver.deleteClassFile(cf.fullyQualifiedTypeName);
    cf.deleteFromFileSystem(buildConfig);
  }

  private UnwovenClassFile createUnwovenClassFile(AjBuildConfig.BinarySourceFile bsf) {
    UnwovenClassFile ucf = null;
    try {
      File outputDir = buildConfig.getOutputDir();
      if (buildConfig.getCompilationResultDestinationManager() != null) {
        // createUnwovenClassFile is called only for classes that are on the inpath,
        // all inpath classes are put in the defaultOutputLocation, therefore,
View Full Code Here

    private IUnwovenClassFile wovenClass;
    private boolean isApplyAtAspectJMungersOnly = false;

    public WeavingClassFileProvider(String name, byte[] bytes) {
      ensureDelegateInitialized(name, bytes);
      this.unwovenClass = new UnwovenClassFile(name, delegateForCurrentClass.getResolvedTypeX().getName(), bytes);
      this.unwovenClasses.add(unwovenClass);

      if (shouldDump(name.replace('/', '.'), true)) {
        dump(name, bytes, true);
      }
View Full Code Here

    private IUnwovenClassFile wovenClass;
    private boolean isApplyAtAspectJMungersOnly = false;

    public WeavingClassFileProvider(String name, byte[] bytes) {
      ensureDelegateInitialized(name, bytes);
      this.unwovenClass = new UnwovenClassFile(name, delegateForCurrentClass.getResolvedTypeX().getName(), bytes);
      this.unwovenClasses.add(unwovenClass);

      if (shouldDump(name.replace('/', '.'), true)) {
        dump(name, bytes, true);
      }
View Full Code Here

    private IUnwovenClassFile wovenClass;
    private boolean isApplyAtAspectJMungersOnly = false;

    public WeavingClassFileProvider(String name, byte[] bytes) {
      ensureDelegateInitialized(name, bytes);
      this.unwovenClass = new UnwovenClassFile(name, delegateForCurrentClass.getResolvedTypeX().getName(), bytes);
      this.unwovenClasses.add(unwovenClass);

      if (shouldDump(name.replace('/', '.'), true)) {
        dump(name, bytes, true);
      }
View Full Code Here

    private List unwovenClasses = new ArrayList(); /* List<UnovenClassFile> */
    private UnwovenClassFile wovenClass;
        private boolean isApplyAtAspectJMungersOnly = false;

        public WeavingClassFileProvider (String name, byte[] bytes) {
      this.unwovenClass = new UnwovenClassFile(name,bytes);
      this.unwovenClasses.add(unwovenClass);
     
      if (shouldDump(name.replace('/', '.'),true)) {
        dump(name, bytes, true);
      }
View Full Code Here

        // add each class file in an in-dir individually, this gives us the best error reporting
        // (they are like 'source' files then), and enables a cleaner incremental treatment of
        // class file changes in indirs.
        File[] binSrcs = FileUtil.listFiles(inPathElement, binarySourceFilter);
        for (int j = 0; j < binSrcs.length; j++) {
          UnwovenClassFile ucf =
            bcelWeaver.addClassFile(binSrcs[j], inPathElement, buildConfig.getOutputDir());
          List ucfl = new ArrayList();
          ucfl.add(ucf);
          state.binarySourceFiles.put(binSrcs[j].getPath(),ucfl);
        }
View Full Code Here

    return getBcelWorld();
  }
 
  void addAspectClassFilesToWeaver(List addedClassFiles) throws IOException {
    for (Iterator i = addedClassFiles.iterator(); i.hasNext(); ) {
      UnwovenClassFile classFile = (UnwovenClassFile) i.next();
      getWeaver().addClassFile(classFile);
    }
  }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.bcel.UnwovenClassFile

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.