Packageorg.granite.reflect.visitor
Interfacepublic interface IVisitor
ImplementorsGenericValidator

A "two-phases" visitor pattern interface. Exploring a bean is a sequence of two-phases processes: first, the visitor is asked if it accepts to visit each property of a bean; second, for each accepted property, the property is visited and cascaded.

See also

Guide


Public Methods
 MethodDefined by
  
accept(visitable:Visitable):Boolean
Returns true if this IVisitor implementation "accepts" to visit the supplied visitable, false otherwise.
IVisitor
  
visit(visitable:Visitable):Boolean
Returns true if this IVisitor implementation, after visiting the supplied visitable, wants it to be cascaded (so its properties will be visited), false otherwise.
IVisitor
Method detail
accept()method
public function accept(visitable:Visitable):Boolean

Returns true if this IVisitor implementation "accepts" to visit the supplied visitable, false otherwise.

Parameters
visitable:Visitable — the Visitable to be accepted or not.

Returns
Boolean — true if this IVisitor implementation "accepts" to visit the supplied visitable, false otherwise.
visit()method 
public function visit(visitable:Visitable):Boolean

Returns true if this IVisitor implementation, after visiting the supplied visitable, wants it to be cascaded (so its properties will be visited), false otherwise.

This method is not called if this IVisitor implementation didn't return true after the call to the "accept" method.

Parameters
visitable:Visitable — the Visitable to be visited and then cascaded or not.

Returns
Boolean — true if this IVisitor implementation wants to cascade the supplied visitable value, false otherwise.