org.codehaus.plexus.component.collections
Class AbstractComponentCollection

java.lang.Object
  extended by org.codehaus.plexus.component.collections.AbstractComponentCollection
Direct Known Subclasses:
ComponentList, ComponentMap

public abstract class AbstractComponentCollection
extends java.lang.Object

Author:
Jason van Zyl

Field Summary
protected  PlexusContainer container
          The reference to the PlexusContainer
protected  java.lang.String hostComponent
          The component that requires this collection of components
protected  Logger logger
          Used to log errors in the component lookup process.
protected  org.codehaus.plexus.classworlds.realm.ClassRealm realm
          The realm we need to lookup in
protected  java.lang.String role
          The role of the components we are holding in this Collection.
protected  java.util.List<java.lang.String> roleHints
          The role hint of the components we are holding in this Collection.
 
Constructor Summary
AbstractComponentCollection(PlexusContainer container, org.codehaus.plexus.classworlds.realm.ClassRealm realm, java.lang.String role, java.util.List roleHints, java.lang.String hostComponent)
           
 
Method Summary
protected  boolean checkUpdate()
           
 void clear()
           
protected  java.util.Map<java.lang.String,ComponentDescriptor> getComponentDescriptorMap()
           
protected  java.util.Map<java.lang.String,org.codehaus.plexus.classworlds.realm.ClassRealm> getLookupRealmMap()
           
protected  java.util.List<org.codehaus.plexus.classworlds.realm.ClassRealm> getLookupRealms()
          Retrieve the set of all ClassRealms with a descendant-or-self relationship to the ClassRealm used to construct this component collection.
protected  java.lang.Object lookup(java.lang.String role, java.lang.String roleHint, org.codehaus.plexus.classworlds.realm.ClassRealm realm)
           
protected abstract  void releaseAllCallback()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

protected PlexusContainer container
The reference to the PlexusContainer


role

protected java.lang.String role
The role of the components we are holding in this Collection.


roleHints

protected java.util.List<java.lang.String> roleHints
The role hint of the components we are holding in this Collection.


realm

protected org.codehaus.plexus.classworlds.realm.ClassRealm realm
The realm we need to lookup in


hostComponent

protected java.lang.String hostComponent
The component that requires this collection of components


logger

protected Logger logger
Used to log errors in the component lookup process.

Constructor Detail

AbstractComponentCollection

public AbstractComponentCollection(PlexusContainer container,
                                   org.codehaus.plexus.classworlds.realm.ClassRealm realm,
                                   java.lang.String role,
                                   java.util.List roleHints,
                                   java.lang.String hostComponent)
Method Detail

getLookupRealms

protected java.util.List<org.codehaus.plexus.classworlds.realm.ClassRealm> getLookupRealms()
Retrieve the set of all ClassRealms with a descendant-or-self relationship to the ClassRealm used to construct this component collection. This set will be used to collect all of the component instances from all realms which are likely to work from this collection.


getLookupRealmMap

protected java.util.Map<java.lang.String,org.codehaus.plexus.classworlds.realm.ClassRealm> getLookupRealmMap()

getComponentDescriptorMap

protected java.util.Map<java.lang.String,ComponentDescriptor> getComponentDescriptorMap()

checkUpdate

protected boolean checkUpdate()

lookup

protected java.lang.Object lookup(java.lang.String role,
                                  java.lang.String roleHint,
                                  org.codehaus.plexus.classworlds.realm.ClassRealm realm)

clear

public void clear()

releaseAllCallback

protected abstract void releaseAllCallback()


Copyright © 2001-2008 Codehaus. All Rights Reserved.