if (beanVisibilityType.equals(PARENT_ONLY)) {
return parentApplicationContext;
}
if (beanVisibilityType.equals(PARENT_FIRST)) {
GraphModuleStateHolder graphModuleStateHolder = ObjectUtils.cast(getModuleStateHolder(), GraphModuleStateHolder.class);
return new ParentFirstBeanGraphInheritanceStrategy().getParentApplicationContext(graphModuleStateHolder, parentApplicationContext, definition);
}
if (beanVisibilityType.equals(GRAPH_ORDERED)) {
GraphModuleStateHolder graphModuleStateHolder = ObjectUtils.cast(getModuleStateHolder(), GraphModuleStateHolder.class);
return new GraphOrderedBeanInheritanceStrategy().getParentApplicationContext(graphModuleStateHolder, parentApplicationContext, definition);
}
throw new ConfigurationException("Invalid value for property " + CoreBootstrapProperties.GRAPH_BEAN_VISIBILITY_TYPE + ". Permissible values are " + Arrays.asList(NONE, PARENT_ONLY, PARENT_FIRST, GRAPH_ORDERED));
}