public final class DefaultPlexusContainer extends Object implements MutablePlexusContainer
PlexusContainer
shim that delegates to a Plexus-aware Guice Injector
.Constructor and Description |
---|
DefaultPlexusContainer() |
DefaultPlexusContainer(ContainerConfiguration configuration) |
DefaultPlexusContainer(ContainerConfiguration configuration,
com.google.inject.Module... customModules) |
Modifier and Type | Method and Description |
---|---|
void |
addComponent(Object component,
String role) |
<T> void |
addComponent(T component,
Class<?> role,
String hint) |
<T> void |
addComponentDescriptor(ComponentDescriptor<T> descriptor) |
void |
addPlexusInjector(List<PlexusBeanModule> beanModules,
com.google.inject.Module... customModules) |
org.codehaus.plexus.classworlds.realm.ClassRealm |
createChildRealm(String id) |
List<ComponentDescriptor<?>> |
discoverComponents(org.codehaus.plexus.classworlds.realm.ClassRealm realm) |
List<ComponentDescriptor<?>> |
discoverComponents(org.codehaus.plexus.classworlds.realm.ClassRealm realm,
com.google.inject.Module... customModules) |
void |
dispose() |
org.codehaus.plexus.classworlds.ClassWorld |
getClassWorld() |
<T> ComponentDescriptor<T> |
getComponentDescriptor(Class<T> type,
String role,
String hint) |
ComponentDescriptor<?> |
getComponentDescriptor(String role,
String hint) |
<T> List<ComponentDescriptor<T>> |
getComponentDescriptorList(Class<T> type,
String role) |
List |
getComponentDescriptorList(String role) |
<T> Map<String,ComponentDescriptor<T>> |
getComponentDescriptorMap(Class<T> type,
String role) |
Map |
getComponentDescriptorMap(String role) |
org.codehaus.plexus.classworlds.realm.ClassRealm |
getContainerRealm() |
Context |
getContext() |
Logger |
getLogger() |
LoggerManager |
getLoggerManager() |
org.codehaus.plexus.classworlds.realm.ClassRealm |
getLookupRealm() |
boolean |
hasComponent(Class role) |
boolean |
hasComponent(Class role,
String hint) |
boolean |
hasComponent(Class type,
String role,
String hint) |
boolean |
hasComponent(String role) |
boolean |
hasComponent(String role,
String hint) |
<T> T |
lookup(Class<T> role) |
<T> T |
lookup(Class<T> role,
String hint) |
<T> T |
lookup(Class<T> type,
String role,
String hint) |
Object |
lookup(String role) |
Object |
lookup(String role,
String hint) |
<T> List<T> |
lookupList(Class<T> role) |
List<Object> |
lookupList(String role) |
<T> Map<String,T> |
lookupMap(Class<T> role) |
Map<String,Object> |
lookupMap(String role) |
void |
release(Object component) |
void |
releaseAll(List<?> components) |
void |
releaseAll(Map<String,?> components) |
void |
setLoggerManager(LoggerManager loggerManager) |
org.codehaus.plexus.classworlds.realm.ClassRealm |
setLookupRealm(org.codehaus.plexus.classworlds.realm.ClassRealm realm) |
public DefaultPlexusContainer() throws PlexusContainerException
PlexusContainerException
public DefaultPlexusContainer(ContainerConfiguration configuration) throws PlexusContainerException
PlexusContainerException
public DefaultPlexusContainer(ContainerConfiguration configuration, com.google.inject.Module... customModules) throws PlexusContainerException
PlexusContainerException
public Context getContext()
getContext
in interface PlexusContainer
public Object lookup(String role) throws ComponentLookupException
lookup
in interface PlexusContainer
ComponentLookupException
public Object lookup(String role, String hint) throws ComponentLookupException
lookup
in interface PlexusContainer
ComponentLookupException
public <T> T lookup(Class<T> role) throws ComponentLookupException
lookup
in interface PlexusContainer
ComponentLookupException
public <T> T lookup(Class<T> role, String hint) throws ComponentLookupException
lookup
in interface PlexusContainer
ComponentLookupException
public <T> T lookup(Class<T> type, String role, String hint) throws ComponentLookupException
lookup
in interface PlexusContainer
ComponentLookupException
public List<Object> lookupList(String role) throws ComponentLookupException
lookupList
in interface PlexusContainer
ComponentLookupException
public <T> List<T> lookupList(Class<T> role) throws ComponentLookupException
lookupList
in interface PlexusContainer
ComponentLookupException
public Map<String,Object> lookupMap(String role) throws ComponentLookupException
lookupMap
in interface PlexusContainer
ComponentLookupException
public <T> Map<String,T> lookupMap(Class<T> role) throws ComponentLookupException
lookupMap
in interface PlexusContainer
ComponentLookupException
public boolean hasComponent(String role)
hasComponent
in interface PlexusContainer
public boolean hasComponent(String role, String hint)
hasComponent
in interface PlexusContainer
public boolean hasComponent(Class role)
hasComponent
in interface PlexusContainer
public boolean hasComponent(Class role, String hint)
hasComponent
in interface PlexusContainer
public boolean hasComponent(Class type, String role, String hint)
hasComponent
in interface PlexusContainer
public void addComponent(Object component, String role)
addComponent
in interface PlexusContainer
public <T> void addComponent(T component, Class<?> role, String hint)
addComponent
in interface PlexusContainer
public <T> void addComponentDescriptor(ComponentDescriptor<T> descriptor)
addComponentDescriptor
in interface PlexusContainer
public ComponentDescriptor<?> getComponentDescriptor(String role, String hint)
getComponentDescriptor
in interface PlexusContainer
public <T> ComponentDescriptor<T> getComponentDescriptor(Class<T> type, String role, String hint)
getComponentDescriptor
in interface PlexusContainer
public List getComponentDescriptorList(String role)
getComponentDescriptorList
in interface PlexusContainer
public <T> List<ComponentDescriptor<T>> getComponentDescriptorList(Class<T> type, String role)
getComponentDescriptorList
in interface PlexusContainer
public Map getComponentDescriptorMap(String role)
getComponentDescriptorMap
in interface PlexusContainer
public <T> Map<String,ComponentDescriptor<T>> getComponentDescriptorMap(Class<T> type, String role)
getComponentDescriptorMap
in interface PlexusContainer
public List<ComponentDescriptor<?>> discoverComponents(org.codehaus.plexus.classworlds.realm.ClassRealm realm)
discoverComponents
in interface PlexusContainer
public List<ComponentDescriptor<?>> discoverComponents(org.codehaus.plexus.classworlds.realm.ClassRealm realm, com.google.inject.Module... customModules)
public void addPlexusInjector(List<PlexusBeanModule> beanModules, com.google.inject.Module... customModules)
public org.codehaus.plexus.classworlds.ClassWorld getClassWorld()
getClassWorld
in interface MutablePlexusContainer
public org.codehaus.plexus.classworlds.realm.ClassRealm getContainerRealm()
getContainerRealm
in interface PlexusContainer
public org.codehaus.plexus.classworlds.realm.ClassRealm setLookupRealm(org.codehaus.plexus.classworlds.realm.ClassRealm realm)
setLookupRealm
in interface PlexusContainer
public org.codehaus.plexus.classworlds.realm.ClassRealm getLookupRealm()
getLookupRealm
in interface PlexusContainer
public org.codehaus.plexus.classworlds.realm.ClassRealm createChildRealm(String id)
createChildRealm
in interface PlexusContainer
public LoggerManager getLoggerManager()
getLoggerManager
in interface MutablePlexusContainer
@Inject(optional=true) public void setLoggerManager(LoggerManager loggerManager)
setLoggerManager
in interface MutablePlexusContainer
public Logger getLogger()
getLogger
in interface MutablePlexusContainer
public void release(Object component)
release
in interface PlexusContainer
public void releaseAll(Map<String,?> components)
releaseAll
in interface PlexusContainer
public void releaseAll(List<?> components)
releaseAll
in interface PlexusContainer
public void dispose()
dispose
in interface PlexusContainer
Copyright © 2010-2019 Sonatype, Inc.. All Rights Reserved.