Jody Garnett a écrit : > johann sorel wrote: >> Is it possible to make a visitor that break out of the "visiting" >> operation if he found something he doesnt like ? > Yes; but for the specifics it depends on how the visitor interface was > written. Some visitor interfaces explicitly return a true / false to > indicate if they are "done". Our Filter visitor returns an Object and > you the implementor can do with that what you want. Since our visitor > is reponsible for navigating the Expression structure itself I > recommend the following... > - make a visitor for "IsStaticExpression" that returns true or false > - when visiting something like an AND expression you can "break out" > (ie return false) when you find your first child expression that is > non static > > There are lots of examples in the code base. Could I have some more tips because I dont see how to return something with the expressionVisitor. It just have N visit(..) methods that will be called on each element in the expression. I dont see how I could break out.
-- Johann Sorel Company - Geomatys GIS Developer Mail - [EMAIL PROTECTED] ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
