public interface EnvironmentCapable
All Spring application contexts are EnvironmentCapable, and the interface is used primarily
instanceof checks in framework methods that accept BeanFactory
instances that may or may not actually be ApplicationContext instances in order to interact
with the environment if indeed it is available.
extends EnvironmentCapable, and thus exposes a
getEnvironment() method; however,
getEnvironment() and narrows the signature to return a
The effect is that an Environment object is 'read-only' until it is being accessed from
a ConfigurableApplicationContext, at which point it too may be configured.
|Modifier and Type||Method and Description|
Environmentassociated with this component (may be
nullor a default environment).