Package org.codehaus.plexus
Class DefaultPlexusContainer
java.lang.Object
org.codehaus.plexus.DefaultPlexusContainer
- All Implemented Interfaces:
MutablePlexusContainer
,PlexusContainer
PlexusContainer
shim that delegates to a Plexus-aware Guice Injector
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final class
(package private) final class
(package private) final class
(package private) final class
(package private) final class
(package private) final class
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ClassRealmManager
private final String
private final com.google.inject.Module
(package private) final org.codehaus.plexus.classworlds.realm.ClassRealm
(package private) final Context
private static final String
private final com.google.inject.Module
(package private) final Map<org.codehaus.plexus.classworlds.realm.ClassRealm,
List<ComponentDescriptor<?>>> private boolean
private final boolean
private Logger
private LoggerManager
(package private) final DefaultPlexusContainer.LoggerManagerProvider
(package private) final ThreadLocal<org.codehaus.plexus.classworlds.realm.ClassRealm>
private static final com.google.inject.Module[]
(package private) final PlexusBeanLocator
(package private) final BeanManager
(package private) final AtomicInteger
(package private) final MutableBeanLocator
private final BeanScanning
(package private) final Map<?,
?> -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPlexusContainer
(ContainerConfiguration configuration) DefaultPlexusContainer
(ContainerConfiguration configuration, com.google.inject.Module... customModules) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addComponent
(Object component, String role) <T> void
addComponent
(T component, Class<?> role, String hint) <T> void
addComponentDescriptor
(ComponentDescriptor<T> descriptor) com.google.inject.Injector
addPlexusInjector
(List<? extends PlexusBeanModule> beanModules, com.google.inject.Module... customModules) org.codehaus.plexus.classworlds.realm.ClassRealm
discoverComponents
(org.codehaus.plexus.classworlds.realm.ClassRealm realm) discoverComponents
(org.codehaus.plexus.classworlds.realm.ClassRealm realm, com.google.inject.Module... customModules) void
dispose()
org.codehaus.plexus.classworlds.ClassWorld
<T> ComponentDescriptor<T>
getComponentDescriptor
(Class<T> type, String role, String hint) getComponentDescriptor
(String role, String hint) <T> List<ComponentDescriptor<T>>
getComponentDescriptorList
(Class<T> type, String role) <T> Map<String,
ComponentDescriptor<T>> getComponentDescriptorMap
(Class<T> type, String role) org.codehaus.plexus.classworlds.realm.ClassRealm
private static Context
getContextComponent
(ContainerConfiguration configuration) org.codehaus.plexus.classworlds.realm.ClassRealm
private Collection<org.codehaus.plexus.classworlds.realm.ClassRealm>
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) private static <T> boolean
hasPlexusBeans
(Iterable<PlexusBean<T>> beans) private <T> Iterable<PlexusBean<T>>
<T> T
<T> T
<T> T
private static org.codehaus.plexus.classworlds.realm.ClassRealm
lookupContainerRealm
(ContainerConfiguration configuration) <T> List<T>
lookupList
(Class<T> role) lookupList
(String role) private URL
lookupPlexusXml
(ContainerConfiguration configuration) Finds container configuration URL, may search the containerClassRealm
and local file-system.private static <T> ComponentDescriptor<T>
newComponentDescriptor
(String role, PlexusBean<T> bean) private static BeanScanning
parseScanningOption
(String scanning) void
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)
-
Field Details
-
DEFAULT_REALM_NAME
- See Also:
-
NO_CUSTOM_MODULES
private static final com.google.inject.Module[] NO_CUSTOM_MODULES -
plexusRank
-
descriptorMap
final Map<org.codehaus.plexus.classworlds.realm.ClassRealm,List<ComponentDescriptor<?>>> descriptorMap -
lookupRealm
-
loggerManagerProvider
-
qualifiedBeanLocator
-
context
-
variables
-
containerRealm
final org.codehaus.plexus.classworlds.realm.ClassRealm containerRealm -
classRealmManager
-
plexusBeanLocator
-
plexusBeanManager
-
componentVisibility
-
isAutoWiringEnabled
private final boolean isAutoWiringEnabled -
scanning
-
containerModule
private final com.google.inject.Module containerModule -
defaultsModule
private final com.google.inject.Module defaultsModule -
loggerManager
-
logger
-
disposing
private boolean disposing
-
-
Constructor Details
-
DefaultPlexusContainer
- Throws:
PlexusContainerException
-
DefaultPlexusContainer
- Throws:
PlexusContainerException
-
DefaultPlexusContainer
public DefaultPlexusContainer(ContainerConfiguration configuration, com.google.inject.Module... customModules) throws PlexusContainerException - Throws:
PlexusContainerException
-
-
Method Details
-
getContext
- Specified by:
getContext
in interfacePlexusContainer
-
lookup
- Specified by:
lookup
in interfacePlexusContainer
- Throws:
ComponentLookupException
-
lookup
- Specified by:
lookup
in interfacePlexusContainer
- Throws:
ComponentLookupException
-
lookup
- Specified by:
lookup
in interfacePlexusContainer
- Throws:
ComponentLookupException
-
lookup
- Specified by:
lookup
in interfacePlexusContainer
- Throws:
ComponentLookupException
-
lookup
- Specified by:
lookup
in interfacePlexusContainer
- Throws:
ComponentLookupException
-
lookupList
- Specified by:
lookupList
in interfacePlexusContainer
- Throws:
ComponentLookupException
-
lookupList
- Specified by:
lookupList
in interfacePlexusContainer
- Throws:
ComponentLookupException
-
lookupMap
- Specified by:
lookupMap
in interfacePlexusContainer
- Throws:
ComponentLookupException
-
lookupMap
- Specified by:
lookupMap
in interfacePlexusContainer
- Throws:
ComponentLookupException
-
hasComponent
- Specified by:
hasComponent
in interfacePlexusContainer
-
hasComponent
- Specified by:
hasComponent
in interfacePlexusContainer
-
hasComponent
- Specified by:
hasComponent
in interfacePlexusContainer
-
hasComponent
- Specified by:
hasComponent
in interfacePlexusContainer
-
hasComponent
- Specified by:
hasComponent
in interfacePlexusContainer
-
addComponent
- Specified by:
addComponent
in interfacePlexusContainer
-
addComponent
- Specified by:
addComponent
in interfacePlexusContainer
-
addComponentDescriptor
- Specified by:
addComponentDescriptor
in interfacePlexusContainer
-
getComponentDescriptor
- Specified by:
getComponentDescriptor
in interfacePlexusContainer
-
getComponentDescriptor
- Specified by:
getComponentDescriptor
in interfacePlexusContainer
-
getComponentDescriptorList
- Specified by:
getComponentDescriptorList
in interfacePlexusContainer
-
getComponentDescriptorList
- Specified by:
getComponentDescriptorList
in interfacePlexusContainer
-
getComponentDescriptorMap
- Specified by:
getComponentDescriptorMap
in interfacePlexusContainer
-
getComponentDescriptorMap
- Specified by:
getComponentDescriptorMap
in interfacePlexusContainer
-
discoverComponents
public List<ComponentDescriptor<?>> discoverComponents(org.codehaus.plexus.classworlds.realm.ClassRealm realm) - Specified by:
discoverComponents
in interfacePlexusContainer
-
discoverComponents
public List<ComponentDescriptor<?>> discoverComponents(org.codehaus.plexus.classworlds.realm.ClassRealm realm, com.google.inject.Module... customModules) -
addPlexusInjector
public com.google.inject.Injector addPlexusInjector(List<? extends PlexusBeanModule> beanModules, com.google.inject.Module... customModules) -
getClassWorld
public org.codehaus.plexus.classworlds.ClassWorld getClassWorld()- Specified by:
getClassWorld
in interfaceMutablePlexusContainer
-
getContainerRealm
public org.codehaus.plexus.classworlds.realm.ClassRealm getContainerRealm()- Specified by:
getContainerRealm
in interfacePlexusContainer
-
setLookupRealm
public org.codehaus.plexus.classworlds.realm.ClassRealm setLookupRealm(org.codehaus.plexus.classworlds.realm.ClassRealm realm) - Specified by:
setLookupRealm
in interfacePlexusContainer
-
getLookupRealm
public org.codehaus.plexus.classworlds.realm.ClassRealm getLookupRealm()- Specified by:
getLookupRealm
in interfacePlexusContainer
-
createChildRealm
- Specified by:
createChildRealm
in interfacePlexusContainer
-
getLoggerManager
- Specified by:
getLoggerManager
in interfaceMutablePlexusContainer
-
setLoggerManager
- Specified by:
setLoggerManager
in interfaceMutablePlexusContainer
-
getLogger
- Specified by:
getLogger
in interfaceMutablePlexusContainer
-
release
- Specified by:
release
in interfacePlexusContainer
-
releaseAll
- Specified by:
releaseAll
in interfacePlexusContainer
-
releaseAll
- Specified by:
releaseAll
in interfacePlexusContainer
-
dispose
public void dispose()- Specified by:
dispose
in interfacePlexusContainer
-
parseScanningOption
-
lookupContainerRealm
private static org.codehaus.plexus.classworlds.realm.ClassRealm lookupContainerRealm(ContainerConfiguration configuration) throws PlexusContainerException - Parameters:
configuration
- The container configuration- Returns:
- Container class realm
- Throws:
PlexusContainerException
-
lookupPlexusXml
Finds container configuration URL, may search the containerClassRealm
and local file-system.- Parameters:
configuration
- The container configuration- Returns:
- Local or remote URL
-
getContextComponent
-
locate
-
getVisibleRealms
-
hasPlexusBeans
-
newComponentDescriptor
-