An interface for instances that can provide an ILookup capability for a given object.
Inheritance Hierarchy
Remarks
This is useful in the case where lookup functionality is not intrinsic to an item or where an existing object cannot implement the interface or when an item needs to be decorated externally with new lookup functionality.
See Also
API
- ILookup
Members
No filters for this type
Methods
Tries to create or retrieve an implementation of the given type for a given item.
Tries to create or retrieve an implementation of the given type for a given item.
abstract
Parameters
- item: any
- the item to look up a type for
- type: Constructor
- the type to look up
Return Value
- Object
- an implementation or
null
See Also
API
- lookup
Implemented in
ContextLookup.contextLookupConstants
An ILookupContext instance that always returns null.
An
ILookupContext instance that always returns null.Static Methods
Creates an implementation of the interface IContextLookup by using the given function as implementation for its contextLookup method.
Creates an implementation of the interface IContextLookup by using the given function as implementation for its contextLookup method.
static
Parameters
- contextLookup: function(any, Constructor): any
- A function for IContextLookup's single abstract method contextLookup.
Return Value
- IContextLookup
- An instance of the IContextLookup interface based on the given function.