Description
The current method signature of Form#visitComponents allows for passing in an implementation of IVisitor that will cause a ClassCastException.
Example
Add a CheckBox and TextField to the Form. Pass in an IVisitor<CheckBox> to visitComponents. There will be a ClassCastException when the IVisitor<CheckBox> attempts to visit the TextField.
The method signature should be changed to
public final <R> R visitFormComponents(final IVisitor<FormComponent<?>, R> visitor)
or the method should be removed to prevent confusion.