Package org.eclipse.jdt.internal.compiler

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


  // and the installed global variable classes
  VariablesInfo installedVars = this.context.installedVars;
  if (installedVars != null) {
    ClassFile[] classFiles = installedVars.classFiles;
    for (int i = 0; i < classFiles.length; i++) {
      ClassFile classFile = classFiles[i];
      IBinaryType binary = null;
      try {
        binary = new ClassFileReader(classFile.getBytes(), null);
      } catch (ClassFormatException e) {
        e.printStackTrace(); // Should never happen since we compiled this type
      }
      compiler.lookupEnvironment.cacheBinaryType(binary, null /*no access restriction*/);
    }
 
View Full Code Here


      engine.lookupEnvironment.cacheBinaryType(binaryType, null /*no access restriction*/);
    }

    ClassFile[] classFiles = this.installedVars.classFiles;
    for (int i = 0; i < classFiles.length; i++) {
      ClassFile classFile = classFiles[i];
      IBinaryType binary = null;
      try {
        binary = new ClassFileReader(classFile.getBytes(), null);
      } catch (ClassFormatException e) {
        e.printStackTrace(); // Should never happen since we compiled this type
      }
      engine.lookupEnvironment.cacheBinaryType(binary, null /*no access restriction*/);
    }
 
View Full Code Here

private void deployCodeSnippetClassIfNeeded(IRequestor requestor) throws InstallException {
  if (this.codeSnippetBinary == null) {
    // Deploy CodeSnippet class (only once)
    if (!requestor.acceptClassFiles(
      new ClassFile[] {
        new ClassFile() {
          public byte[] getBytes() {
            return getCodeSnippetBytes();
          }
          public char[][] getCompoundName() {
            return EvaluationConstants.ROOT_COMPOUND_NAME;
View Full Code Here

      // otherwise an AbortCompilation is thrown in 1.5 mode since the enclosing type
      // is needed to resolve a nested type
      Util.sort(classes, new Util.Comparer() {
        public int compare(Object a, Object b) {
          if (a == b) return 0;
          ClassFile enclosing = ((ClassFile) a).enclosingClassFile;
          while (enclosing != null) {
            if (enclosing == b)
              return 1;
            enclosing = enclosing.enclosingClassFile;
          }
View Full Code Here

      generateClasspathStructure = true;
    } // else leave currentDestinationPath null
    if (currentDestinationPath != null) {
      for (int i = 0, fileCount = classFiles.length; i < fileCount; i++) {
        // retrieve the key and the corresponding classfile
        ClassFile classFile = classFiles[i];
        char[] filename = classFile.fileName();
        int length = filename.length;
        char[] relativeName = new char[length + 6];
        System.arraycopy(filename, 0, relativeName, 0, length);
        System.arraycopy(SuffixConstants.SUFFIX_class, 0, relativeName, length, 6);
        CharOperation.replace(relativeName, '/', File.separatorChar);
View Full Code Here

        outputLocation = new File(currentDestinationPath);
        outputLocation.mkdirs();
      }
      for (int i = 0, fileCount = classFiles.length; i < fileCount; i++) {
        // retrieve the key and the corresponding classfile
        ClassFile classFile = classFiles[i];
        char[] filename = classFile.fileName();
        int length = filename.length;
        char[] relativeName = new char[length + 6];
        System.arraycopy(filename, 0, relativeName, 0, length);
        System.arraycopy(SuffixConstants.SUFFIX_class, 0, relativeName, length, 6);
        CharOperation.replace(relativeName, '/', File.separatorChar);
View Full Code Here

      generateClasspathStructure = true;
    } // else leave currentDestinationPath null
    if (currentDestinationPath != null) {
      for (int i = 0, fileCount = classFiles.length; i < fileCount; i++) {
        // retrieve the key and the corresponding classfile
        ClassFile classFile = classFiles[i];
        char[] filename = classFile.fileName();
        int length = filename.length;
        char[] relativeName = new char[length + 6];
        System.arraycopy(filename, 0, relativeName, 0, length);
        System.arraycopy(SuffixConstants.SUFFIX_class, 0, relativeName, length, 6);
        CharOperation.replace(relativeName, '/', File.separatorChar);
View Full Code Here

  this.compilationResult.recoveryScannerData = null; // recovery is already done

  ClassFile[] classFiles = this.compilationResult.getClassFiles();
  for (int i = 0, max = classFiles.length; i < max; i++) {
    // clear the classFile back pointer to the bindings
    ClassFile classFile = classFiles[i];
    // null out the classfile backpointer to a type binding
    classFile.referenceBinding = null;
    classFile.innerClassesBindings = null;
    classFile.missingTypes = null;
    classFile.visitedTypes = null;
View Full Code Here

  this.compilationResult.recoveryScannerData = null; // recovery is already done

  ClassFile[] classFiles = this.compilationResult.getClassFiles();
  for (int i = 0, max = classFiles.length; i < max; i++) {
    // clear the classFile back pointer to the bindings
    ClassFile classFile = classFiles[i];
    // null out the classfile backpointer to a type binding
    classFile.referenceBinding = null;
    classFile.innerClassesBindings = null;
    classFile.bootstrapMethods = null;
    classFile.missingTypes = null;
View Full Code Here

  // and the installed global variable classes
  VariablesInfo installedVars = this.context.installedVars;
  if (installedVars != null) {
    ClassFile[] classFiles = installedVars.classFiles;
    for (int i = 0; i < classFiles.length; i++) {
      ClassFile classFile = classFiles[i];
      IBinaryType binary = null;
      try {
        binary = new ClassFileReader(classFile.getBytes(), null);
      } catch (ClassFormatException e) {
        e.printStackTrace(); // Should never happen since we compiled this type
      }
      compiler.lookupEnvironment.cacheBinaryType(binary, null /*no access restriction*/);
    }
 
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.