public abstract class AbstractMetaInfoManager
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements org.apache.avalon.fortress.MetaInfoManager
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map |
m_classnames
Map for classname to MetaInfoEntry.
|
private java.lang.ClassLoader |
m_loader
The classloader used to load and check roles and components.
|
private org.apache.avalon.fortress.MetaInfoManager |
m_parent
Parent
MetaInfoManager for nested resolution. |
private java.util.Map |
m_shorthands
Map for shorthand to MetaInfoEntry.
|
| Constructor and Description |
|---|
AbstractMetaInfoManager()
Default constructor--this RoleManager has no parent.
|
AbstractMetaInfoManager(org.apache.avalon.fortress.MetaInfoManager parent)
Create a MetaInfoManager with a parent manager.
|
AbstractMetaInfoManager(org.apache.avalon.fortress.MetaInfoManager parent,
java.lang.ClassLoader loader)
Alternate constructor--this RoleManager has the specified
parent.
|
AbstractMetaInfoManager(org.apache.avalon.fortress.RoleManager parent)
Create a MetaInfoManager with a parent manager.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addComponent(java.lang.String role,
java.lang.String className,
java.util.Properties meta,
java.util.List deps)
Addition of a component to the meta info manager.
|
protected java.lang.ClassLoader |
getLoader()
Get the classloader used for the RoleManager for any class that
extends this one.
|
org.apache.avalon.fortress.MetaInfoEntry |
getMetaInfoForClassname(java.lang.String classname)
Get a
MetaInfoEntry for a component type. |
org.apache.avalon.fortress.MetaInfoEntry |
getMetaInfoForShortName(java.lang.String shortname)
Return the meta info relative to a supplied short name.
|
protected boolean |
isAlreadyAdded(java.lang.String className)
Let us know that the meta and dependency info has already been
loaded for a given class name.
|
private final java.lang.ClassLoader m_loader
private final java.util.Map m_shorthands
private final java.util.Map m_classnames
private final org.apache.avalon.fortress.MetaInfoManager m_parent
MetaInfoManager for nested resolution.public AbstractMetaInfoManager()
public AbstractMetaInfoManager(org.apache.avalon.fortress.RoleManager parent)
parent - The parent RoleManager.public AbstractMetaInfoManager(org.apache.avalon.fortress.MetaInfoManager parent)
parent - The parent MetaInfoManager.public AbstractMetaInfoManager(org.apache.avalon.fortress.MetaInfoManager parent,
java.lang.ClassLoader loader)
parent - The parent MetaInfoManagerloader - The class loaderprotected void addComponent(java.lang.String role,
java.lang.String className,
java.util.Properties meta,
java.util.List deps)
role - the role associated with the componentclassName - the class namemeta - the properties object for the meta infopublic org.apache.avalon.fortress.MetaInfoEntry getMetaInfoForClassname(java.lang.String classname)
MetaInfoEntry for a component type. This facilitates
self-healing configuration files where the impl reads the
configuration and translates all <component/>
entries to use the short hand name for readability.getMetaInfoForClassname in interface org.apache.avalon.fortress.MetaInfoManagerclassname - The component type nameMetaInfoEntrypublic org.apache.avalon.fortress.MetaInfoEntry getMetaInfoForShortName(java.lang.String shortname)
getMetaInfoForShortName in interface org.apache.avalon.fortress.MetaInfoManagershortname - the short nameMetaInfoEntryprotected java.lang.ClassLoader getLoader()
protected boolean isAlreadyAdded(java.lang.String className)
className - The name of the class to checktrue if it has been added