Package org.aspectj.org.eclipse.jdt.internal.compiler.util

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleLookupTable


  }
  // map the additional source files by qualified type name
  if (additionalFiles == null) {
    this.additionalUnits = null;
  } else {
    this.additionalUnits = new SimpleLookupTable(additionalFiles.length);
    for (int i = 0, l = additionalFiles.length; i < l; i++) {
      SourceFile additionalUnit = additionalFiles[i];
      if (additionalUnit != null)
        this.additionalUnits.put(additionalUnit.initialTypeName, additionalFiles[i]);
    }
View Full Code Here


AccessRuleSet accessRuleSet;

ClasspathDirectory(IContainer binaryFolder, boolean isOutputFolder, AccessRuleSet accessRuleSet) {
  this.binaryFolder = binaryFolder;
  this.isOutputFolder = isOutputFolder;
  this.directoryCache = new SimpleLookupTable(5);
  this.accessRuleSet = accessRuleSet;
}
View Full Code Here

public boolean isPackage(String qualifiedPackageName) {
  return directoryList(qualifiedPackageName) != null;
}

public void reset() {
  this.directoryCache = new SimpleLookupTable(5);
}
View Full Code Here

  char[][] fullExclusionPatternChars;
  char[][] fulInclusionPatternChars;

ClasspathSourceDirectory(IContainer sourceFolder, char[][] fullExclusionPatternChars, char[][] fulInclusionPatternChars) {
  this.sourceFolder = sourceFolder;
  this.directoryCache = new SimpleLookupTable(5);
  this.fullExclusionPatternChars = fullExclusionPatternChars;
  this.fulInclusionPatternChars = fulInclusionPatternChars;
}
View Full Code Here

public void cleanup() {
  this.directoryCache = null;
}

SimpleLookupTable directoryTable(String qualifiedPackageName) {
  SimpleLookupTable dirTable = (SimpleLookupTable) directoryCache.get(qualifiedPackageName);
  if (dirTable == missingPackageHolder) return null; // package exists in another classpath directory or jar
  if (dirTable != null) return dirTable;

  try {
    IResource container = sourceFolder.findMember(qualifiedPackageName); // this is a case-sensitive check
    if (container instanceof IContainer) {
      IResource[] members = ((IContainer) container).members();
      dirTable = new SimpleLookupTable();
      for (int i = 0, l = members.length; i < l; i++) {
        IResource m = members[i];
        String name;
        if (m.getType() == IResource.FILE) {
          int index = Util.indexOfJavaLikeExtension(name = m.getName());
          if (index >= 0) {
            String fullPath = m.getFullPath().toString();
            if (!org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isExcluded(fullPath.toCharArray(), this.fulInclusionPatternChars, this.fullExclusionPatternChars, false/*not a folder path*/)) {
              dirTable.put(name.substring(0, index), m);
            }
          }
        }
      }
      directoryCache.put(qualifiedPackageName, dirTable);
View Full Code Here

  return sourceFolder.equals(((ClasspathSourceDirectory) o).sourceFolder);
}

public NameEnvironmentAnswer findClass(String sourceFileWithoutExtension, String qualifiedPackageName, String qualifiedSourceFileWithoutExtension) {
  SimpleLookupTable dirTable = directoryTable(qualifiedPackageName);
  if (dirTable != null && dirTable.elementSize > 0) {
    IFile file = (IFile) dirTable.get(sourceFileWithoutExtension);
    if (file != null) {
      return new NameEnvironmentAnswer(new ResourceCompilationUnit(file, file.getLocationURI()), null /* no access restriction */);
    }
  }
  return null;
View Full Code Here

public boolean isPackage(String qualifiedPackageName) {
  return directoryTable(qualifiedPackageName) != null;
}

public void reset() {
  this.directoryCache = new SimpleLookupTable(5);
}
View Full Code Here

}
SimpleLookupTable storedAnnotations(boolean forceInitialize) {
  if (forceInitialize && this.storedAnnotations == null) {
    if (!this.environment.globalOptions.storeAnnotations)
      return null; // not supported during this compile
    this.storedAnnotations = new SimpleLookupTable(3);
  }
  return this.storedAnnotations;
}
View Full Code Here

SimpleLookupTable storedAnnotations(boolean forceInitialize) {
  if (forceInitialize && this.storedAnnotations == null && this.scope != null) { // scope null when no annotation cached, and type got processed fully (159631)
    this.scope.referenceCompilationUnit().compilationResult.hasAnnotations = true;
    if (!this.scope.environment().globalOptions.storeAnnotations)
      return null; // not supported during this compile
    this.storedAnnotations = new SimpleLookupTable(3);
  }
  return this.storedAnnotations;
}
View Full Code Here

    return true;
  if (otherType.id == TypeIds.T_JavaLangObject)
    return true;
  Object result;
  if (this.compatibleCache == null) {
    this.compatibleCache = new SimpleLookupTable(3);
    result = null;
  } else {
    result = this.compatibleCache.get(otherType);
    if (result != null) {
      return result == Boolean.TRUE;
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

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.