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

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); // [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

  this.previousStructuralBuildTime = -1;
  this.structurallyChangedTypes = null;
  this.javaProjectName = javaBuilder.currentProject.getName();
  this.sourceLocations = javaBuilder.nameEnvironment.sourceLocations;
  this.binaryLocations = javaBuilder.nameEnvironment.binaryLocations;
  this.references = new SimpleLookupTable(7);
  this.typeLocators = new SimpleLookupTable(7);

  this.buildNumber = 0; // indicates a full build
  this.lastStructuralBuildTime = computeStructuralBuildTime(javaBuilder.lastState == null ? 0 : javaBuilder.lastState.lastStructuralBuildTime);
  this.structuralBuildTimes = new SimpleLookupTable(3);
}
View Full Code Here

  try {
    this.references = (SimpleLookupTable) lastState.references.clone();
    this.typeLocators = (SimpleLookupTable) lastState.typeLocators.clone();
  } catch (CloneNotSupportedException e) {
    this.references = new SimpleLookupTable(lastState.references.elementSize);
    Object[] keyTable = lastState.references.keyTable;
    Object[] valueTable = lastState.references.valueTable;
    for (int i = 0, l = keyTable.length; i < l; i++)
      if (keyTable[i] != null)
        this.references.put(keyTable[i], valueTable[i]);

    this.typeLocators = new SimpleLookupTable(lastState.typeLocators.elementSize);
    keyTable = lastState.typeLocators.keyTable;
    valueTable = lastState.typeLocators.valueTable;
    for (int i = 0, l = keyTable.length; i < l; i++)
      if (keyTable[i] != null)
        this.typeLocators.put(keyTable[i], valueTable[i]);
View Full Code Here

      case INTERNAL_JAR :
        newState.binaryLocations[i] = ClasspathLocation.forLibrary(root.getFile(new Path(in.readUTF())), readRestriction(in));
    }
  }

  newState.structuralBuildTimes = new SimpleLookupTable(length = in.readInt());
  for (int i = 0; i < length; i++)
    newState.structuralBuildTimes.put(in.readUTF(), new Long(in.readLong()));

  String[] internedTypeLocators = new String[length = in.readInt()];
  for (int i = 0; i < length; i++)
    internedTypeLocators[i] = in.readUTF();

  newState.typeLocators = new SimpleLookupTable(length = in.readInt());
  for (int i = 0; i < length; i++)
    newState.recordLocatorForType(in.readUTF(), internedTypeLocators[in.readInt()]);

  char[][] internedRootNames = ReferenceCollection.internSimpleNames(readNames(in), false);
  char[][] internedSimpleNames = ReferenceCollection.internSimpleNames(readNames(in), false);
  char[][][] internedQualifiedNames = new char[length = in.readInt()][][];
  for (int i = 0; i < length; i++) {
    int qLength = in.readInt();
    char[][] qName = new char[qLength][];
    for (int j = 0; j < qLength; j++)
      qName[j] = internedSimpleNames[in.readInt()];
    internedQualifiedNames[i] = qName;
  }
  internedQualifiedNames = ReferenceCollection.internQualifiedNames(internedQualifiedNames, false);

  newState.references = new SimpleLookupTable(length = in.readInt());
  for (int i = 0; i < length; i++) {
    String typeLocator = internedTypeLocators[in.readInt()];
    ReferenceCollection collection = null;
    switch (in.readByte()) {
      case 1 :
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.