org.inria.ns.reflex.util
Class LookupKey

java.lang.Object
  extended by org.inria.ns.reflex.util.LookupKey
All Implemented Interfaces:
Unwrappable

public abstract class LookupKey
extends Object
implements Unwrappable

A LookupKey is a key that allow to retrieve a resource in a registry. A lookup key embeds in itself the lookup method and the real key with which the resource is stored. This class wraps the real key with which each resource is stored.

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.structures.Unwrappable
Unwrappable.Unwrapper
 
Field Summary
 
Fields inherited from interface org.inria.ns.reflex.structures.Unwrappable
UNWRAPPER
 
Constructor Summary
LookupKey(Key key)
          Create a lookup key based on a given key.
 
Method Summary
abstract  Object lookup(Registry registry)
          Lookup for a resource.
 Object unwrap()
          Return the real key with which each resource is stored.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookupKey

public LookupKey(Key key)
Create a lookup key based on a given key.

Parameters:
key - The key to wrap.
Method Detail

lookup

public abstract Object lookup(Registry registry)
Lookup for a resource.

Parameters:
registry - The registry at the low extremity of the branch.

unwrap

public Object unwrap()
Return the real key with which each resource is stored.

Specified by:
unwrap in interface Unwrappable
Returns:
The key with which each resource is stored.
See Also:
Unwrappable.unwrap()