// Check that module != null
Assert.isNotNullArgument(module, "module");
int nEntities = module.getNGemEntities();
ModuleTypeInfo workingModuleTypeInfo = getWorkingModuleTypeInfo();
// Add all entities from the working module, or only public entities from non-working modules.
Set<GemEntity> visibleEntitySet = new LinkedHashSet<GemEntity>();
for (int i = 0; i < nEntities; i++) {
GemEntity gemEntity = module.getNthGemEntity(i);
if (workingModuleTypeInfo.isEntityVisible(gemEntity.getFunctionalAgent())) {
visibleEntitySet.add(gemEntity);
}
}
// Apply the view policy if any.