|
|||||||||||
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.ContextDescriptor
A descriptor describing the Context that the Component is passed to describe information about Runtime environment of Component. It contains information such as;
Also associated with each Context is a set of arbitrary attributes that can be used to store extra information about Context requirements.
Field Summary | |
static String |
AVALON_CONTEXT_CLASSNAME
Context interface classname. |
static String |
CLASSLOADER_KEY
The context entry key for accessing a component classloader. |
static String |
HOME_KEY
The context entry key for accessing a component home directory. |
static String |
NAME_KEY
The context entry key for accessing a component name. |
static String |
PARTITION_KEY
The context entry key for accessing a component partition name. |
static String |
STRATEGY_KEY
Context attribute key used to declare a custom contextualization interface. |
static String |
TEMP_KEY
The context entry key for accessing a component temporary directory. |
Constructor Summary | |
ContextDescriptor(EntryDescriptor[] entries)
Create a standard descriptor without attributes. |
|
ContextDescriptor(String classname,
EntryDescriptor[] entries)
Create a descriptor without attributes. |
|
ContextDescriptor(String classname,
EntryDescriptor[] entries,
Properties attributes)
Create a descriptor. |
Method Summary | |
boolean |
equals(Object other)
Test is the supplied object is equal to this object. |
String |
getContextInterfaceClassname()
Return the classname of the context object interface that the supplied context argument supports under a type-safe cast. |
EntryDescriptor[] |
getEntries()
Return the local entries contained in the context. |
EntryDescriptor |
getEntry(String alias)
Return the entry with specified alias. |
int |
hashCode()
Return the hashcode for the object. |
EntryDescriptor[] |
merge(EntryDescriptor[] entries)
Returns a set of entry descriptors resulting from a merge of the descriptors container in this descriptor with the supplied descriptors. |
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, toString, wait, wait, wait |
Field Detail |
public static final String NAME_KEY
public static final String PARTITION_KEY
public static final String HOME_KEY
public static final String TEMP_KEY
public static final String CLASSLOADER_KEY
public static final String STRATEGY_KEY
public static final String AVALON_CONTEXT_CLASSNAME
Constructor Detail |
public ContextDescriptor(EntryDescriptor[] entries)
entries
- the set of entries required within the contextpublic ContextDescriptor(String classname, EntryDescriptor[] entries)
classname
- the classname of a castable interfaceentries
- the set of entries required within the contextpublic ContextDescriptor(String classname, EntryDescriptor[] entries, Properties attributes) throws NullPointerException, IllegalArgumentException
classname
- the classname of a castable interfaceentries
- the set of entries required within the contextattributes
- supplimentary attributes associated with the context
NullPointerException
- if the entries argument is null
IllegalArgumentException
Method Detail |
public String getContextInterfaceClassname()
public EntryDescriptor[] getEntries()
public EntryDescriptor getEntry(String alias)
alias
- the context entry key to lookup
public EntryDescriptor[] merge(EntryDescriptor[] entries) throws IllegalArgumentException
entries
- the entries to merge
IllegalArgumentException
- if a entry conflict occurspublic 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 |