final class Component
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static java.lang.String |
ATTR_NAME |
(package private) static java.lang.String |
ATTR_TYPE |
private java.util.Properties |
m_attributes |
private java.util.List |
m_dependencies |
private java.util.List |
m_dependencyNames |
private com.thoughtworks.qdox.model.JavaClass |
m_javaClass |
(package private) static java.util.Set |
m_repository
The repository of components.
|
private java.util.List |
m_serviceNames |
private org.apache.avalon.fortress.util.dag.Vertex |
m_vertex |
private static java.lang.String |
META_NAME |
private static java.lang.String |
METH_SERVICE |
private static java.lang.String |
POOLABLE |
private static java.lang.String |
RECYCLABLE |
private static java.lang.String |
SERVICE_MANAGER |
private static java.lang.String |
SINGLE_THREADED |
private static java.lang.String |
TAG_DEPENDENCY |
private static java.lang.String |
TAG_HANDLER |
private static java.lang.String |
TAG_INFO |
private static java.lang.String |
TAG_LIFESTYLE |
private static java.lang.String |
TAG_NAME |
private static java.lang.String |
TAG_SERVICE |
private static java.lang.String |
THREAD_SAFE |
| Constructor and Description |
|---|
Component(com.thoughtworks.qdox.model.JavaClass javaClass)
Initialize a service with the type name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDependency(Service service)
Add a dependency to this type.
|
private java.lang.String |
checkImport(com.thoughtworks.qdox.model.JavaSource sourceCode,
java.lang.String type,
java.lang.String className) |
private java.lang.String |
checkPackage(com.thoughtworks.qdox.model.JavaSource sourceCode,
java.lang.String pack,
java.lang.String serviceName) |
private void |
discoverDependencies()
Recursively discover dependencies from the local class hierarchy.
|
private boolean |
discoverDependencies(com.thoughtworks.qdox.model.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.
|
org.apache.avalon.fortress.util.dag.Vertex |
getVertex() |
protected java.lang.String |
resolveClassName(com.thoughtworks.qdox.model.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) |
private void |
writeIfChanged(java.util.Properties props,
java.io.File file,
java.lang.String desc)
Only writes the properties file if it is new or if the existing file
contains different values.
|
private static final java.lang.String SINGLE_THREADED
private static final java.lang.String THREAD_SAFE
private static final java.lang.String POOLABLE
private static final java.lang.String RECYCLABLE
private static final java.lang.String SERVICE_MANAGER
static final java.lang.String ATTR_TYPE
static final java.lang.String ATTR_NAME
private static final java.lang.String TAG_SERVICE
private static final java.lang.String TAG_DEPENDENCY
private static final java.lang.String TAG_LIFESTYLE
private static final java.lang.String TAG_HANDLER
private static final java.lang.String TAG_INFO
private static final java.lang.String TAG_NAME
private static final java.lang.String META_NAME
private static final java.lang.String METH_SERVICE
static final java.util.Set m_repository
private final com.thoughtworks.qdox.model.JavaClass m_javaClass
private final java.util.Properties m_attributes
private final java.util.List m_dependencies
private final org.apache.avalon.fortress.util.dag.Vertex m_vertex
private final java.util.List m_dependencyNames
private final java.util.List m_serviceNames
public Component(com.thoughtworks.qdox.model.JavaClass javaClass)
javaClass - private void discoverDependencies()
private boolean discoverDependencies(com.thoughtworks.qdox.model.JavaClass fromClass)
fromClass - The JavaClass object to gather the dependency set from.private void discoverNameInfo()
private void discoverLifecycleType()
public java.lang.String getType()
public java.util.Iterator getDependencyNames()
public java.util.Iterator getServiceNames()
public void addDependency(Service service)
service - The name of the service that depends on this.public org.apache.avalon.fortress.util.dag.Vertex getVertex()
public void setAttribute(java.lang.String name,
java.lang.String value)
name - The name of the attributevalue - The attribute valueprivate void writeIfChanged(java.util.Properties props,
java.io.File file,
java.lang.String desc)
throws java.io.IOException
java.io.IOExceptionpublic void serialize(java.io.File rootDir)
throws java.io.IOException
rootDir - java.io.IOExceptionprivate java.lang.String stripQuotes(java.lang.String value)
protected java.lang.String resolveClassName(com.thoughtworks.qdox.model.JavaSource sourceCode,
java.lang.String serviceName)
serviceName - The service type nameprivate java.lang.String checkImport(com.thoughtworks.qdox.model.JavaSource sourceCode,
java.lang.String type,
java.lang.String className)
private java.lang.String checkPackage(com.thoughtworks.qdox.model.JavaSource sourceCode,
java.lang.String pack,
java.lang.String serviceName)