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

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


}

void storeAnnotations(Binding binding, AnnotationBinding[] annotations) {
  AnnotationHolder holder = null;
  if (annotations == null || annotations.length == 0) {
    SimpleLookupTable store = storedAnnotations(false);
    if (store != null)
      holder = (AnnotationHolder) store.get(binding);
    if (holder == null) return; // nothing to delete
  } else {
    SimpleLookupTable store = storedAnnotations(true);
    if (store == null) return; // not supported
    holder = (AnnotationHolder) store.get(binding);
    if (holder == null)
      holder = new AnnotationHolder();
  }
  storeAnnotationHolder(binding, holder.setAnnotations(annotations));
}
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

  this.defaultImports = null;
  this.nameEnvironment = nameEnvironment;
  this.knownPackages = new HashtableOfPackage();
  this.uniqueArrayBindings = new ArrayBinding[5][];
  this.uniqueArrayBindings[0] = new ArrayBinding[50]; // start off the most common 1 dimension array @ 50
  this.uniqueParameterizedTypeBindings = new SimpleLookupTable(3);
  this.uniqueRawTypeBindings = new SimpleLookupTable(3);
  this.uniqueWildcardBindings = new SimpleLookupTable(3);
  this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
  this.missingTypes = null;
  this.accessRestrictions = new HashMap(3);
  this.classFilePool = ClassFilePool.newInstance();
}
View Full Code Here

    if (arrayBindings != null)
      for (int j = arrayBindings.length; --j >= 0;)
        arrayBindings[j] = null;
  }
  // NOTE: remember to fix #updateCaches(...) when adding unique binding caches
  this.uniqueParameterizedTypeBindings = new SimpleLookupTable(3);
  this.uniqueRawTypeBindings = new SimpleLookupTable(3);
  this.uniqueWildcardBindings = new SimpleLookupTable(3);
  this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
  this.missingTypes = null;

  for (int i = this.units.length; --i >= 0;)
    this.units[i] = null;
  this.lastUnitIndex = -1;
View Full Code Here

  this.defaultImports = null;
  this.nameEnvironment = nameEnvironment;
  this.knownPackages = new HashtableOfPackage();
  this.uniqueArrayBindings = new ArrayBinding[5][];
  this.uniqueArrayBindings[0] = new ArrayBinding[50]; // start off the most common 1 dimension array @ 50
  this.uniqueParameterizedTypeBindings = new SimpleLookupTable(3);
  this.uniqueRawTypeBindings = new SimpleLookupTable(3);
  this.uniqueWildcardBindings = new SimpleLookupTable(3);
  this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
  this.uniquePolymorphicMethodBindings = new SimpleLookupTable(3);
  this.missingTypes = null;
  this.accessRestrictions = new HashMap(3);
  this.classFilePool = ClassFilePool.newInstance();
  this.typesBeingConnected = new HashSet();
}
View Full Code Here

}
public ParameterizedMethodBinding createGetClassMethod(TypeBinding receiverType, MethodBinding originalMethod, Scope scope) {
  // see if we have already cached this method for the given receiver type.
  ParameterizedMethodBinding retVal = null;
  if (this.uniqueGetClassMethodBinding == null) {
    this.uniqueGetClassMethodBinding = new SimpleLookupTable(3);
  } else {
    retVal = (ParameterizedMethodBinding)this.uniqueGetClassMethodBinding.get(receiverType);
  }
  if (retVal == null) {
    retVal = ParameterizedMethodBinding.instantiateGetClass(receiverType, originalMethod, scope);
View Full Code Here

    if (arrayBindings != null)
      for (int j = arrayBindings.length; --j >= 0;)
        arrayBindings[j] = null;
  }
  // NOTE: remember to fix #updateCaches(...) when adding unique binding caches
  this.uniqueParameterizedTypeBindings = new SimpleLookupTable(3);
  this.uniqueRawTypeBindings = new SimpleLookupTable(3);
  this.uniqueWildcardBindings = new SimpleLookupTable(3);
  this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
  this.uniquePolymorphicMethodBindings = new SimpleLookupTable(3);
  this.uniqueGetClassMethodBinding = null;
  this.missingTypes = null;
  this.typesBeingConnected = new HashSet();

  for (int i = this.units.length; --i >= 0;)
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

  if (substring == null) {
    if (memoryIndex == null) {
      for (int i = 0, l = docNames.length; i < l; i++)
        results.add(docNames[i]);
    } else {
      SimpleLookupTable docsToRefs = memoryIndex.docsToReferences;
      for (int i = 0, l = docNames.length; i < l; i++) {
        String docName = docNames[i];
        if (!docsToRefs.containsKey(docName))
          results.add(docName);
      }
    }
  } else {
    if (memoryIndex == null) {
      for (int i = 0, l = docNames.length; i < l; i++)
        if (docNames[i].startsWith(substring, 0))
          results.add(docNames[i]);
    } else {
      SimpleLookupTable docsToRefs = memoryIndex.docsToReferences;
      for (int i = 0, l = docNames.length; i < l; i++) {
        String docName = docNames[i];
        if (docName.startsWith(substring, 0) && !docsToRefs.containsKey(docName))
          results.add(docName);
      }
    }
  }
  return results;
View Full Code Here

TOP

Related Classes of 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.