This override does seemingly nothing, but in fact splits invocation
groups to two -- those going to SourceSpecificContext and those
going to a NamespaceStorageSupport subclass. More specifically, if
a caller knows it is talking to NamespaceStorageSupport, JIT does
will not consider SourceSpecificContext an implementation.
Furthermore, SourceSpecificContext, as an implementation class,
guarantees it will return BuildGlobalContext.
Change-Id: Ia285f9d7745a9c114d3dd3214c2b82a651db3ce0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
private Map<Class<?>, Map<?,?>> namespaces = ImmutableMap.of();
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * This method override provides bimorphic invocation on this method invocation between
+ * {@link SourceSpecificContext} and the more general {@link NamespaceStorageSupport}. We typically do not expect
+ * the two accesses to overlap.
+ */
@Override
public abstract NamespaceStorageNode getParentNamespaceStorage();
}
@Override
- public NamespaceStorageNode getParentNamespaceStorage() {
+ public BuildGlobalContext getParentNamespaceStorage() {
return globalContext;
}