public class MultimapBasedScope extends AbstractScope
Multimap.
This implementation assumes, that the keys of the Multimap are the keys of the contained EObjectDescriptions
as well as the name.
When looking up elements using AbstractScope.getElements(QualifiedName) this implementation looks up the elements from the map, hence are much
more efficient for many IEObjectDescriptions.AbstractScope.ParentIterable| Modifier | Constructor and Description |
|---|---|
protected |
MultimapBasedScope(IScope parent,
com.google.common.collect.Multimap<QualifiedName,IEObjectDescription> elements,
boolean ignoreCase) |
| Modifier and Type | Method and Description |
|---|---|
static IScope |
createScope(IScope parent,
java.lang.Iterable<IEObjectDescription> descriptions,
boolean ignoreCase) |
protected java.lang.Iterable<IEObjectDescription> |
getAllLocalElements() |
protected java.lang.Iterable<IEObjectDescription> |
getLocalElementsByName(QualifiedName name) |
protected boolean |
isShadowed(IEObjectDescription fromParent)
Returns
true if the given description input from the parent scope is
shadowed by local elements. |
getAllElements, getElements, getElements, getLocalElementsByEObject, getParent, getParentElements, getSingleElement, getSingleElement, getSingleLocalElementByName, isIgnoreCase, toStringprotected MultimapBasedScope(IScope parent, com.google.common.collect.Multimap<QualifiedName,IEObjectDescription> elements, boolean ignoreCase)
public static IScope createScope(IScope parent, java.lang.Iterable<IEObjectDescription> descriptions, boolean ignoreCase)
protected java.lang.Iterable<IEObjectDescription> getAllLocalElements()
getAllLocalElements in class AbstractScopeprotected java.lang.Iterable<IEObjectDescription> getLocalElementsByName(QualifiedName name)
getLocalElementsByName in class AbstractScopeprotected boolean isShadowed(IEObjectDescription fromParent)
AbstractScopetrue if the given description input from the parent scope is
shadowed by local elements.isShadowed in class AbstractScopetrue if the given description input from the parent scope is
shadowed by local elements.