@Test public void testHasProfileInProperty() { String oldValue = PropertyManager.getProperty(PropertyManager.RUNTIME_PROFILES); try { System.clearProperty(PropertyManager.RUNTIME_PROFILES); PropertyManager.refresh(); assertFalse(ExoContainer.hasProfileInProperty(null)); assertFalse(ExoContainer.hasProfileInProperty("foo0")); PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, "foo1"); assertFalse(ExoContainer.hasProfileInProperty(null)); assertFalse(ExoContainer.hasProfileInProperty("foo0")); assertTrue(ExoContainer.hasProfileInProperty("foo1")); System.clearProperty(PropertyManager.RUNTIME_PROFILES); PropertyManager.refresh(); assertFalse(ExoContainer.hasProfileInProperty("foo0")); PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, "foo1, foo2, foo3"); assertFalse(ExoContainer.hasProfileInProperty("foo0")); assertTrue(ExoContainer.hasProfileInProperty("foo1")); assertTrue(ExoContainer.hasProfileInProperty("foo2")); assertTrue(ExoContainer.hasProfileInProperty("foo3")); PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, " \tfoo "); assertFalse(ExoContainer.hasProfileInProperty("foo0")); assertTrue(ExoContainer.hasProfileInProperty("foo")); PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, ",foo "); assertFalse(ExoContainer.hasProfileInProperty("foo0")); assertTrue(ExoContainer.hasProfileInProperty("foo")); PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, "foo, bar, \t baz \t"); assertFalse(ExoContainer.hasProfileInProperty("foo0")); assertTrue(ExoContainer.hasProfileInProperty("baz")); PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, "foo1, bar, \t baz1 \t"); assertFalse(ExoContainer.hasProfileInProperty("foo0")); assertFalse(ExoContainer.hasProfileInProperty("baz")); assertTrue(ExoContainer.hasProfileInProperty("bar")); } finally { if (oldValue == null) { System.clearProperty(PropertyManager.RUNTIME_PROFILES); PropertyManager.refresh(); } else { PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, oldValue); } } }
public static boolean hasProfileInProperty(String profileName) { return getProfilesFromProperty().contains(profileName); }
ExoContainer extends AbstractContainer { public static boolean hasProfileInProperty(String profileName) { return getProfilesFromProperty().contains(profileName); } }
ExoContainer extends AbstractContainer { public static boolean hasProfileInProperty(String profileName) { return getProfilesFromProperty().contains(profileName); } ExoContainer();  ExoContainer(ExoContainer parent); }
ExoContainer extends AbstractContainer { public static boolean hasProfileInProperty(String profileName) { return getProfilesFromProperty().contains(profileName); } ExoContainer();  ExoContainer(ExoContainer parent); static Set<String> getProfilesFromProperty(); static Set<String> getProfiles(); static boolean hasProfileInProperty(String profileName); static boolean hasProfile(String profileName); ExoContainerContext getContext(); synchronized void dispose(); synchronized void start(boolean init); synchronized void initialize(); synchronized void start(); synchronized void stop(); void addComponentLifecylePlugin(ComponentLifecyclePlugin plugin); void addContainerLifecylePlugin(ContainerLifecyclePlugin plugin); ComponentAdapter<T> registerComponentImplementation(Class<T> componentImplementation); ComponentAdapter<T> registerComponentInstance(T componentInstance); T createComponent(Class<T> clazz); ComponentAdapter<?> getComponentAdapter(Object componentKey); Object getComponentInstance(Object componentKey); @Managed @ManagedName("RegisteredComponentNames") @ManagedDescription("Return the list of the registered component names") Set<String> getRegisteredComponentNames(); ExoContainer getParent(); boolean canBeStarted(); boolean canBeStopped(); boolean canBeDisposed(); ContextManager getContextManager(); boolean isContextManagerLoaded(); T getComponentInstanceOfType(Class<T> componentType); T getComponentInstanceOfType(Class<T> componentType, boolean autoRegistration); ComponentAdapter<T> getComponentAdapterOfType(Class<T> componentType); ComponentAdapter<T> getComponentAdapterOfType(Class<T> componentType, boolean autoRegistration); T getComponentInstance(Object componentKey, Class<T> bindType); T getComponentInstance(Object componentKey, Class<T> bindType, boolean autoRegistration); ComponentAdapter<T> getComponentAdapter(Object componentKey, Class<T> bindType); ComponentAdapter<T> getComponentAdapter(Object componentKey, Class<T> bindType, boolean autoRegistration); }
ExoContainer extends AbstractContainer { public static boolean hasProfileInProperty(String profileName) { return getProfilesFromProperty().contains(profileName); } ExoContainer();  ExoContainer(ExoContainer parent); static Set<String> getProfilesFromProperty(); static Set<String> getProfiles(); static boolean hasProfileInProperty(String profileName); static boolean hasProfile(String profileName); ExoContainerContext getContext(); synchronized void dispose(); synchronized void start(boolean init); synchronized void initialize(); synchronized void start(); synchronized void stop(); void addComponentLifecylePlugin(ComponentLifecyclePlugin plugin); void addContainerLifecylePlugin(ContainerLifecyclePlugin plugin); ComponentAdapter<T> registerComponentImplementation(Class<T> componentImplementation); ComponentAdapter<T> registerComponentInstance(T componentInstance); T createComponent(Class<T> clazz); ComponentAdapter<?> getComponentAdapter(Object componentKey); Object getComponentInstance(Object componentKey); @Managed @ManagedName("RegisteredComponentNames") @ManagedDescription("Return the list of the registered component names") Set<String> getRegisteredComponentNames(); ExoContainer getParent(); boolean canBeStarted(); boolean canBeStopped(); boolean canBeDisposed(); ContextManager getContextManager(); boolean isContextManagerLoaded(); T getComponentInstanceOfType(Class<T> componentType); T getComponentInstanceOfType(Class<T> componentType, boolean autoRegistration); ComponentAdapter<T> getComponentAdapterOfType(Class<T> componentType); ComponentAdapter<T> getComponentAdapterOfType(Class<T> componentType, boolean autoRegistration); T getComponentInstance(Object componentKey, Class<T> bindType); T getComponentInstance(Object componentKey, Class<T> bindType, boolean autoRegistration); ComponentAdapter<T> getComponentAdapter(Object componentKey, Class<T> bindType); ComponentAdapter<T> getComponentAdapter(Object componentKey, Class<T> bindType, boolean autoRegistration);  }