- nameToSubmodule = submodules == null ? ImmutableMap.of() :
- ImmutableMap.copyOf(Maps.transformValues(submodules,
- submodule -> (SubmoduleEffectiveStatement) submodule.buildEffective()));
+ nameToSubmodule = includedSubmodules == null ? ImmutableMap.of()
+ : ImmutableMap.copyOf(Maps.transformValues(includedSubmodules,
+ submodule -> (SubmoduleEffectiveStatement) submodule.buildEffective()));
+
+ final Map<QName, StmtContext<?, ExtensionStatement, ExtensionEffectiveStatement>> extensions =
+ ctx.getAllFromCurrentStmtCtxNamespace(ExtensionNamespace.class);
+ qnameToExtension = extensions == null ? ImmutableMap.of()
+ : ImmutableMap.copyOf(Maps.transformValues(extensions, StmtContext::buildEffective));
+ final Map<QName, StmtContext<?, FeatureStatement, FeatureEffectiveStatement>> features =
+ ctx.getAllFromCurrentStmtCtxNamespace(FeatureNamespace.class);
+ qnameToFeature = features == null ? ImmutableMap.of()
+ : ImmutableMap.copyOf(Maps.transformValues(features, StmtContext::buildEffective));
+ final Map<QName, StmtContext<?, IdentityStatement, IdentityEffectiveStatement>> identities =
+ ctx.getAllFromCurrentStmtCtxNamespace(IdentityNamespace.class);
+ qnameToIdentity = identities == null ? ImmutableMap.of()
+ : ImmutableMap.copyOf(Maps.transformValues(identities, StmtContext::buildEffective));