Package | com.yworks.support |
Class | public class Lookups |
Inheritance | Lookups Object |
ILookup
implementations.
Property | Defined By | ||
---|---|---|---|
EMPTY : ILookup [static]
An ILookup instance that always returns null. | Lookups | ||
EMPTY_CONTEXT : IContextLookup [static]
An IContextLookup instance that always returns null. | Lookups |
Method | Defined By | ||
---|---|---|---|
addingLookupChainLink(type:Class, instance:Object):IContextLookupChainLink [static]
Factory method for a lookup chain element that simply adds an entry to a lookup chain. | Lookups | ||
createContextLookupChainLink(callback:Function):IContextLookupChainLink [static]
Creates a lookup chain link that is backed by the given callback. | Lookups | ||
dynamicAddingLookupChainLink(instance:Object):IContextLookupChainLink [static]
Factory method for a lookup chain element that adds an dynamic instance to a lookup chain. | Lookups |
EMPTY | property |
public static var EMPTY:ILookup
An ILookup
instance that always returns null
.
EMPTY_CONTEXT | property |
public static var EMPTY_CONTEXT:IContextLookup
An IContextLookup
instance that always returns null
.
addingLookupChainLink | () | method |
public static function addingLookupChainLink(type:Class, instance:Object):IContextLookupChainLink
Factory method for a lookup chain element that simply adds an entry to a lookup chain.
Parameters
type:Class — The type to add to the lookup.
| |
instance:Object — The instance to return if the type is being looked up.
|
IContextLookupChainLink — An instance that can be used in a lookup chain.
|
createContextLookupChainLink | () | method |
public static function createContextLookupChainLink(callback:Function):IContextLookupChainLink
Creates a lookup chain link that is backed by the given callback.
This can be used to query the results of a virtual lookup
call on objects that don't necessarily implement Ilookup
.
If the callback returns null
the request is passed to the chain.
The callback function has to accept two arguments:
function lookupCallback( subject:Object, type:Class ):ObjectWhere the
subject
parameter represents the subject for
which a lookup should be made and the type
parameter represents the
type for which an implementation is being looked up.
Parameters
callback:Function — The callback function to invoke.
|
IContextLookupChainLink — The implementation of the chain link that uses the callback.
|
dynamicAddingLookupChainLink | () | method |
public static function dynamicAddingLookupChainLink(instance:Object):IContextLookupChainLink
Factory method for a lookup chain element that adds an dynamic instance to a lookup chain.
The instance returned will check whether instance
is of the queried type and
will then return the instance.
Parameters
instance:Object — The instance to query the type from dynamically.
|
IContextLookupChainLink — An instance that can be used in a lookup chain.
|