net.dpml.metro.info
Class ContextDescriptor

java.lang.Object
  extended bynet.dpml.metro.info.ContextDescriptor
All Implemented Interfaces:
Serializable

public class ContextDescriptor
extends Object
implements Serializable

A descriptor describing the context that a component declares. The context descriptor contains information about context entries accessable via keys (typically mapped to get[Name] operations on a Context inner interface).

Version:
1.0.1
Author:
Digital Product Meta Library
See Also:
Serialized Form

Constructor Summary
ContextDescriptor(EntryDescriptor[] entries)
          Creation of a new context descriptor.
 
Method Summary
 boolean equals(Object other)
          Test is the supplied object is equal to this object.
 EntryDescriptor getEntryDescriptor(String key)
          Return the entry with specified key.
 EntryDescriptor[] getEntryDescriptors()
          Return the entries contained in the context.
 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 contained in this descriptor with the supplied descriptors.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextDescriptor

public ContextDescriptor(EntryDescriptor[] entries)
Creation of a new context descriptor.

Parameters:
entries - the set of context entries
Method Detail

getEntryDescriptors

public EntryDescriptor[] getEntryDescriptors()
Return the entries contained in the context.

Returns:
the array of entries contained in the context.

getEntryDescriptor

public EntryDescriptor getEntryDescriptor(String key)
                                   throws NullPointerException
Return the entry with specified key.

Parameters:
key - the context entry key
Returns:
the entry matching the key of null if no matching entry
Throws:
NullPointerException - if the key argument is null.

merge

public EntryDescriptor[] merge(EntryDescriptor[] entries)
                        throws IllegalArgumentException
Returns a set of entry descriptors resulting from a merge of the descriptors contained in this descriptor with the supplied descriptors.

Parameters:
entries - the entries to merge
Returns:
the mergerged set of entries
Throws:
IllegalArgumentException - if a entry conflict occurs

equals

public boolean equals(Object other)
Test is the supplied object is equal to this object.

Parameters:
other - the other object
Returns:
true if the object are equivalent

hashCode

public int hashCode()
Return the hashcode for the object.

Returns:
the hashcode value