use of org.eclipse.jdt.internal.compiler.util.HashtableOfModule in project bazel-jdt-java-toolchain by salesforce.
the class ElementsImpl9 method getAllModuleElements.
@Override
public Set<? extends ModuleElement> getAllModuleElements() {
LookupEnvironment lookup = _env.getLookupEnvironment();
HashtableOfModule knownModules = lookup.knownModules;
ModuleBinding[] modules = knownModules.valueTable;
if (modules == null || modules.length == 0) {
return Collections.emptySet();
}
Set<ModuleElement> mods = new HashSet<>(modules.length);
for (ModuleBinding moduleBinding : modules) {
if (moduleBinding == null)
continue;
ModuleElement element = (ModuleElement) _env.getFactory().newElement(moduleBinding);
mods.add(element);
}
mods.add((ModuleElement) _env.getFactory().newElement(lookup.UnNamedModule));
return mods;
}
use of org.eclipse.jdt.internal.compiler.util.HashtableOfModule in project bazel-jdt-java-toolchain by salesforce.
the class LookupEnvironment method reset.
public void reset() {
if (this.root != this) {
this.root.reset();
return;
}
this.stepCompleted = 0;
this.knownModules = new HashtableOfModule();
this.UnNamedModule = new ModuleBinding.UnNamedModule(this);
this.module = this.UnNamedModule;
this.JavaBaseModule = null;
// assume the default package always exists
this.defaultPackage = new PlainPackageBinding(this);
this.defaultImports = null;
this.knownPackages = new HashtableOfPackage();
this.accessRestrictions = new HashMap(3);
this.verifier = null;
// NOTE: remember to fix #updateCaches(...) when adding unique binding caches
this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
this.uniquePolymorphicMethodBindings = new SimpleLookupTable(3);
this.uniqueGetClassMethodBinding = null;
this.missingTypes = null;
this.typesBeingConnected = new LinkedHashSet();
for (int i = this.units.length; --i >= 0; ) this.units[i] = null;
this.lastUnitIndex = -1;
this.lastCompletedUnitIndex = -1;
// in case AbortException occurred
this.unitBeingCompleted = null;
this.classFilePool.reset();
this.typeSystem.reset();
// name environment has a longer life cycle, and must be reset in
// the code which created it.
}
Aggregations