Packageorg.granite.reflect.visitor
Interfacepublic interface IHandler
ImplementorsBeanHandler, CollectionHandler, DictionaryHandler, MapHandler, NullHandler, ObjectHandler, PrimitiveHandler, VectorHandler

IHandler implementations are responsible of cascading specific data properties (properties of a bean, items of a collection, etc.)



Public Methods
 MethodDefined by
  
canHandle(visitable:Visitable):Boolean
Tells if this IHandler implementation can handle the supplied Visitable parameter.
IHandler
  
handle(visitable:Visitable, filter:Function):Array
Handles the supplied Visitable parameter, returning a filtered array of its properties.
IHandler
Method detail
canHandle()method
public function canHandle(visitable:Visitable):Boolean

Tells if this IHandler implementation can handle the supplied Visitable parameter.

Parameters
visitable:Visitable — the Visitable instance that could be handled by this IHandler implementation.

Returns
Booleantrue if this IHandler can handle the visitable parameter, false otherwise.
handle()method 
public function handle(visitable:Visitable, filter:Function):Array

Handles the supplied Visitable parameter, returning a filtered array of its properties.

Parameters
visitable:Visitable — the Visitable instance to be introspected.
 
filter:Function — a filter function on the form of filter(visitable:Visitable):Boolean, that must be call before appending a new property to the returned array.

Returns
Array — an array of Visitable instances (one for each filtered property of the visitable parameter).