org.apache.avalon.fortress
Class RoleEntry

java.lang.Object
  extended by org.apache.avalon.fortress.RoleEntry

public final class RoleEntry
extends java.lang.Object

Keeps track of the relationship of all the associated meta data for a component type. It records the role, short name, component class, and the handler class used to manage it. The short name is included strictly to enable "self-healing" configuration files.

Version:
$Revision: 1.14 $ $Date: 2004/02/28 15:16:24 $
Author:
Avalon Development Team

Field Summary
private  java.lang.Class m_componentClass
           
private  java.lang.Class m_handlerClass
           
private  java.lang.String m_role
           
private  java.lang.String m_shortName
           
 
Constructor Summary
RoleEntry(java.lang.String role, java.lang.String shortName, java.lang.Class componentClass, java.lang.Class handlerClass)
          Create a RoleEntry with all the associated information.
 
Method Summary
 java.lang.Class getComponentClass()
          Get the Class for the component type.
 java.lang.Class getHandlerClass()
          Get the Class for the component type's org.apache.avalon.fortress.impl.handler.ComponentHandler.
 java.lang.String getRole()
          Get the role name for the component type.
 java.lang.String getShortname()
          Get the short name for the component type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_shortName

private final java.lang.String m_shortName

m_role

private final java.lang.String m_role

m_componentClass

private final java.lang.Class m_componentClass

m_handlerClass

private final java.lang.Class m_handlerClass
Constructor Detail

RoleEntry

public RoleEntry(java.lang.String role,
                 java.lang.String shortName,
                 java.lang.Class componentClass,
                 java.lang.Class handlerClass)
          throws java.lang.IllegalArgumentException
Create a RoleEntry with all the associated information. All arguments must be supplied.

Parameters:
role - Role name for this component type
shortName - Short name for this component type
componentClass - Class to instantiate the component type
handlerClass - Class to instantiate the component handler
Throws:
java.lang.NullPointerException - if any argument is null.
java.lang.IllegalArgumentException
Method Detail

getRole

public java.lang.String getRole()
Get the role name for the component type.

Returns:
the role name

getShortname

public java.lang.String getShortname()
Get the short name for the component type. This is used in "self-healing" configuration files.

Returns:
the short name

getComponentClass

public java.lang.Class getComponentClass()
Get the Class for the component type.

Returns:
the Class

getHandlerClass

public java.lang.Class getHandlerClass()
Get the Class for the component type's org.apache.avalon.fortress.impl.handler.ComponentHandler.

Returns:
the Class