Package org.eclipse.jdt.internal.compiler

Examples of org.eclipse.jdt.internal.compiler.ClassFile


                    }
                }
            }
            ClassFile[] classFiles = result.getClassFiles();
            for (int i = 0; i < classFiles.length; i++) {
                ClassFile classFile = classFiles[i];
                String className = CharOperation.toString(classFile.getCompoundName());
                try {
                    this.write(className, classFile.getBytes());
                } catch (IOException e) {
                    this.errorHandler.onError("Unable to write class file: " + e.getMessage(), className, 0, 0);
                }
            }
        }
View Full Code Here


                                }
                            }
                        } else {
                            ClassFile[] classFiles = result.getClassFiles();
                            for (int i = 0; i < classFiles.length; i++) {
                                ClassFile classFile = classFiles[i];
                                char[][] compoundName =
                                    classFile.getCompoundName();
                                String className = "";
                                String sep = "";
                                for (int j = 0;
                                     j < compoundName.length; j++) {
                                    className += sep;
                                    className += new String(compoundName[j]);
                                    sep = ".";
                                }
                                byte[] bytes = classFile.getBytes();
                                String outFile = outputDir + "/" +
                                    className.replace('.', '/') + ".class";
                                FileOutputStream fout =
                                    new FileOutputStream(outFile);
                                BufferedOutputStream bos =
View Full Code Here

          }
      }
      // Something has been compiled
      ClassFile[] clazzFiles = result.getClassFiles();
      for (int i = 0; i < clazzFiles.length; i++) {
          final ClassFile clazzFile = clazzFiles[i];
          final char[][] compoundName = clazzFile.getCompoundName();
          final StringBuffer clazzName = new StringBuffer();
          for (int j = 0; j < compoundName.length; j++) {
              if (j != 0) {
                  clazzName.append('.');
              }
              clazzName.append(compoundName[j]);
          }
          byte[] bytes = clazzFile.getBytes();
          JapidFlags.debug("Bytecode generated for " + clazzName);
          // XXX address anonymous inner class issue!! ....$1...
          String cname = clazzName.toString();
      RendererClass rc = this.rendererCompiler.japidClasses.get(cname);
          if (rc == null) {
View Full Code Here

                    }
                }
                if (!pResult.hasErrors()) {
                    final ClassFile[] clazzFiles = pResult.getClassFiles();
                    for (int i = 0; i < clazzFiles.length; i++) {
                        final ClassFile clazzFile = clazzFiles[i];
                        final char[][] compoundName = clazzFile.getCompoundName();
                        final StringBuilder clazzName = new StringBuilder();
                        for (int j = 0; j < compoundName.length; j++) {
                            if (j != 0) {
                                clazzName.append('.');
                            }
                            clazzName.append(compoundName[j]);
                        }
                        pStore.write(clazzName.toString().replace('.', '/') + ".class", clazzFile.getBytes());
                    }
                }
            }
        };
View Full Code Here

                    }
                }
                if (!pResult.hasErrors()) {
                    final ClassFile[] clazzFiles = pResult.getClassFiles();
                    for (int i = 0; i < clazzFiles.length; i++) {
                        final ClassFile clazzFile = clazzFiles[i];
                        final char[][] compoundName = clazzFile.getCompoundName();
                        final StringBuilder clazzName = new StringBuilder();
                        for (int j = 0; j < compoundName.length; j++) {
                            if (j != 0) {
                                clazzName.append('.');
                            }
                            clazzName.append(compoundName[j]);
                        }
                        pStore.write(clazzName.toString().replace('.', '/') + ".class", clazzFile.getBytes());
                    }
                }
            }
        };
View Full Code Here

  CompiledClass(TypeDeclaration typeDeclaration, CompiledClass enclosingClass) {
    this.enclosingClass = enclosingClass;
    SourceTypeBinding binding = typeDeclaration.binding;
    this.internalName = CharOperation.charToString(binding.constantPoolName());
    ClassFile classFile = getClassFile(typeDeclaration, internalName);
    byte[] bytes = classFile.getBytes();
    this.cacheToken = diskCache.writeByteArray(bytes);
    this.isLocal = isLocalType(binding);
  }
View Full Code Here

                    }
                }
                if (!pResult.hasErrors()) {
                    final ClassFile[] clazzFiles = pResult.getClassFiles();
                    for (int i = 0; i < clazzFiles.length; i++) {
                        final ClassFile clazzFile = clazzFiles[i];
                        final char[][] compoundName = clazzFile.getCompoundName();
                        final StringBuilder clazzName = new StringBuilder();
                        for (int j = 0; j < compoundName.length; j++) {
                            if (j != 0) {
                                clazzName.append('.');
                            }
                            clazzName.append(compoundName[j]);
                        }
                        pStore.write(clazzName.toString().replace('.', '/') + ".class", clazzFile.getBytes());
                    }
                }
            }
        };
View Full Code Here

                            }
                        }
                        if (problemList.isEmpty()) {
                            ClassFile[] classFiles = result.getClassFiles();
                            for (int i = 0; i < classFiles.length; i++) {
                                ClassFile classFile = classFiles[i];
                                char[][] compoundName =
                                    classFile.getCompoundName();
                                String className = "";
                                String sep = "";
                                for (int j = 0;
                                     j < compoundName.length; j++) {
                                    className += sep;
                                    className += new String(compoundName[j]);
                                    sep = ".";
                                }
                                byte[] bytes = classFile.getBytes();
                                String outFile = outputDir + "/" +
                                    className.replace('.', '/') + ".class";
                                FileOutputStream fout =
                                    new FileOutputStream(outFile);
                                BufferedOutputStream bos =
View Full Code Here

    this.unit = unit;
    this.typeDeclaration = typeDeclaration;
    this.enclosingClass = enclosingClass;
    SourceTypeBinding binding = typeDeclaration.binding;
    this.internalName = CharOperation.charToString(binding.constantPoolName());
    ClassFile classFile = getClassFile(typeDeclaration, internalName);
    byte[] bytes = classFile.getBytes();
    this.cacheToken = diskCache.writeByteArray(bytes);
    this.isLocal = isLocalType(binding);
  }
View Full Code Here

                            }
                        }
                        if (problemList.isEmpty()) {
                            ClassFile[] classFiles = result.getClassFiles();
                            for (int i = 0; i < classFiles.length; i++) {
                                ClassFile classFile = classFiles[i];
                                char[][] compoundName =
                                    classFile.getCompoundName();
                                String className = "";
                                String sep = "";
                                for (int j = 0;
                                     j < compoundName.length; j++) {
                                    className += sep;
                                    className += new String(compoundName[j]);
                                    sep = ".";
                                }
                                byte[] bytes = classFile.getBytes();
                                String outFile = outputDir + "/" +
                                    className.replace('.', '/') + ".class";
                                FileOutputStream fout =
                                    new FileOutputStream(outFile);
                                BufferedOutputStream bos =
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.ClassFile

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.