|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.meta.info.Descriptor
org.apache.avalon.meta.info.DependencyDescriptor
A descriptor that describes dependency information for a particular Component. This class contains information about;
Also associated with each dependency is a set of arbitrary
attributes that can be used to store extra information
about dependency. See InfoDescriptor
for example
of how to declare the container specific attributes.
Possible uses for the attributes are to declare container specific constraints of component. For example a dependency on a Corba ORB may also require that the Corba ORB contain the TimeServer and PersistenceStateService at initialization. Or it may require that the componenet be multi-thread safe or that it is persistent etc. These are all container specific demands.
Constructor Summary | |
DependencyDescriptor(String role,
ReferenceDescriptor service)
Creation of a new dependency descriptor. |
|
DependencyDescriptor(String role,
ReferenceDescriptor service,
boolean optional,
Properties attributes)
Creation of a new dependency descriptor. |
|
DependencyDescriptor(String role,
String service)
Creation of a new dependency descriptor using the default 1.0 version |
|
DependencyDescriptor(String role,
String service,
Version version)
Creation of a new dependency descriptor. |
Method Summary | |
boolean |
equals(Object other)
Compare this object with another for equality. |
String |
getKey()
Return the name the component uses to lookup the dependency. |
ReferenceDescriptor |
getReference()
Return the service class/interface descriptor that describes the dependency must fulfilled by a provider. |
ReferenceDescriptor |
getService()
Deprecated. use getReference() |
int |
hashCode()
Return the hashcode for the object. |
boolean |
isOptional()
Return true if dependency is optional, false otherwise. |
boolean |
isRequired()
Return true if dependency is required, false otherwise. |
String |
toString()
|
Methods inherited from class org.apache.avalon.meta.info.Descriptor |
getAttribute, getAttribute, getAttributeNames, getProperties |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DependencyDescriptor(String role, String service)
role
- the role name that will be used by the type when looking up a serviceservice
- the interface servicepublic DependencyDescriptor(String role, String service, Version version)
role
- the role name that will be used by the type when looking up a serviceservice
- the version insterface service referencepublic DependencyDescriptor(String role, ReferenceDescriptor service)
role
- the role name that will be used by the type when looking up a serviceservice
- the version insterface service referencepublic DependencyDescriptor(String role, ReferenceDescriptor service, boolean optional, Properties attributes)
role
- the role name that will be used by the type when looking up a serviceservice
- the version insterface service referenceoptional
- TRUE if this depedency is optionalattributes
- a set of attributes to associate with the dependencyMethod Detail |
public String getKey()
public ReferenceDescriptor getService()
public ReferenceDescriptor getReference()
public boolean isOptional()
public boolean isRequired()
public String toString()
public boolean equals(Object other)
equals
in class Descriptor
other
- the object to compare this object with
public int hashCode()
hashCode
in class Descriptor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |