org.apache.avalon.fortress.tools
Class Component
java.lang.Object
org.apache.avalon.fortress.tools.Component
- final class Component
- extends java.lang.Object
Represents a component, and output the meta information.
- Version:
- CVS $Revision: 1.1 $ $Date: 2004/04/02 08:29:44 $
- Author:
| Constructor Summary |
Component(JavaClass javaClass)
Initialize a service with the type name. |
| Method Summary |
void |
addDependency(Service service)
Add a dependency to this type. |
private java.lang.String |
checkImport(JavaSource sourceCode, java.lang.String type, java.lang.String className)
|
private java.lang.String |
checkPackage(JavaSource sourceCode, java.lang.String pack, java.lang.String serviceName)
|
private void |
discoverDependencies()
Recursively discover dependencies from the local class hierarchy. |
private boolean |
discoverDependencies(JavaClass fromClass)
Discover the dependencies that this component class requires. |
private void |
discoverLifecycleType()
|
private void |
discoverNameInfo()
|
java.util.Iterator |
getDependencyNames()
|
java.util.Iterator |
getServiceNames()
|
java.lang.String |
getType()
Get the type name. |
Vertex |
getVertex()
|
protected java.lang.String |
resolveClassName(JavaSource sourceCode, java.lang.String serviceName)
Resolve the classname from the "@avalon.service" javadoc tags. |
void |
serialize(java.io.File rootDir)
Output the meta information. |
void |
setAttribute(java.lang.String name, java.lang.String value)
Set the component attribute. |
private java.lang.String |
stripQuotes(java.lang.String value)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SINGLE_THREADED
private static final java.lang.String SINGLE_THREADED
-
- See Also:
- Constant Field Values
THREAD_SAFE
private static final java.lang.String THREAD_SAFE
-
- See Also:
- Constant Field Values
POOLABLE
private static final java.lang.String POOLABLE
-
- See Also:
- Constant Field Values
RECYCLABLE
private static final java.lang.String RECYCLABLE
-
- See Also:
- Constant Field Values
SERVICE_MANAGER
private static final java.lang.String SERVICE_MANAGER
-
- See Also:
- Constant Field Values
ATTR_TYPE
static final java.lang.String ATTR_TYPE
-
- See Also:
- Constant Field Values
ATTR_NAME
static final java.lang.String ATTR_NAME
-
- See Also:
- Constant Field Values
TAG_SERVICE
private static final java.lang.String TAG_SERVICE
-
- See Also:
- Constant Field Values
TAG_DEPENDENCY
private static final java.lang.String TAG_DEPENDENCY
-
- See Also:
- Constant Field Values
TAG_LIFESTYLE
private static final java.lang.String TAG_LIFESTYLE
-
- See Also:
- Constant Field Values
TAG_HANDLER
private static final java.lang.String TAG_HANDLER
-
- See Also:
- Constant Field Values
TAG_INFO
private static final java.lang.String TAG_INFO
-
- See Also:
- Constant Field Values
TAG_NAME
private static final java.lang.String TAG_NAME
-
- See Also:
- Constant Field Values
META_NAME
private static final java.lang.String META_NAME
-
- See Also:
- Constant Field Values
METH_SERVICE
private static final java.lang.String METH_SERVICE
-
- See Also:
- Constant Field Values
m_repository
static final java.util.Set m_repository
-
The repository of components.
m_javaClass
private final JavaClass m_javaClass
-
m_attributes
private final java.util.Properties m_attributes
-
m_dependencies
private final java.util.List m_dependencies
-
m_vertex
private final Vertex m_vertex
-
m_dependencyNames
private final java.util.List m_dependencyNames
-
m_serviceNames
private final java.util.List m_serviceNames
-
Component
public Component(JavaClass javaClass)
-
Initialize a service with the type name.
- Parameters:
javaClass -
discoverDependencies
private void discoverDependencies()
-
Recursively discover dependencies from the local class hierarchy. This does not, and cannot discover dependencies from classes from other JARs.
-
discoverDependencies
private boolean discoverDependencies(JavaClass fromClass)
-
Discover the dependencies that this component class requires.
-
- Parameters:
fromClass - The JavaClass object to gather the dependency set from.
discoverNameInfo
private void discoverNameInfo()
-
discoverLifecycleType
private void discoverLifecycleType()
-
getType
public java.lang.String getType()
-
Get the type name.
-
- Returns:
- String
getDependencyNames
public java.util.Iterator getDependencyNames()
-
getServiceNames
public java.util.Iterator getServiceNames()
-
addDependency
public void addDependency(Service service)
-
Add a dependency to this type.
-
- Parameters:
service - The name of the service that depends on this.
getVertex
public Vertex getVertex()
-
setAttribute
public void setAttribute(java.lang.String name,
java.lang.String value)
-
Set the component attribute.
-
- Parameters:
name - The name of the attribute
value - The attribute value
serialize
public void serialize(java.io.File rootDir)
throws java.io.IOException
-
Output the meta information.
-
- Parameters:
rootDir -
- Throws:
java.io.IOException
stripQuotes
private java.lang.String stripQuotes(java.lang.String value)
-
resolveClassName
protected java.lang.String resolveClassName(JavaSource sourceCode,
java.lang.String serviceName)
-
Resolve the classname from the "@avalon.service" javadoc tags.
-
- Parameters:
serviceName - The service type name
- Returns:
- The fully qualified class name
checkImport
private java.lang.String checkImport(JavaSource sourceCode,
java.lang.String type,
java.lang.String className)
-
checkPackage
private java.lang.String checkPackage(JavaSource sourceCode,
java.lang.String pack,
java.lang.String serviceName)
-
Please see keelframework.org for information about new Keel releases.