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

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


}
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

    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); // [dbg reset] this.compatibleCache.put(otherType,null)
    if (result != null) {
      return result == Boolean.TRUE;
View Full Code Here

  }
  return readableName;
}

public AnnotationHolder retrieveAnnotationHolder(Binding binding, boolean forceInitialization) {
  SimpleLookupTable store = storedAnnotations(forceInitialization);
  return store == null ? null : (AnnotationHolder) store.get(binding);
}
View Full Code Here

  return this.sourceName;
}

void storeAnnotationHolder(Binding binding, AnnotationHolder holder) {
  if (holder == null) {
    SimpleLookupTable store = storedAnnotations(false);
    if (store != null)
      store.removeKey(binding);
  } else {
    SimpleLookupTable store = storedAnnotations(true);
    if (store != null)
      store.put(binding, holder);
  }
}
View Full Code Here

}

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

  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

    if (result == null)
      results.putUnsafely(word, new EntryResult(word, docs));
    else
      result.addDocumentTable(docs);
  } else {
    SimpleLookupTable docsToRefs = memoryIndex.docsToReferences;
    if (result == null) result = new EntryResult(word, null);
    int[] docNumbers = readDocumentNumbers(docs);
    for (int i = 0, l = docNumbers.length; i < l; i++) {
      String docName = readDocumentName(docNumbers[i]);
      if (!docsToRefs.containsKey(docName))
        result.addDocumentName(docName);
    }
    if (!result.isEmpty())
      results.put(word, result);
  }
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.